aboutsummaryrefslogtreecommitdiffstats
path: root/test/C++Frontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-05 00:18:21 +0000
committerChris Lattner <sabre@nondot.org>2004-10-05 00:18:21 +0000
commitcbd141fa3355696c1810bf87c0e15a407a82dc1e (patch)
treef82d467d88a32ed31b56c6eda75ca27beb7f455e /test/C++Frontend
parent0d98aede69482382794a851fb6fb9ff4a495294e (diff)
downloadexternal_llvm-cbd141fa3355696c1810bf87c0e15a407a82dc1e.zip
external_llvm-cbd141fa3355696c1810bf87c0e15a407a82dc1e.tar.gz
external_llvm-cbd141fa3355696c1810bf87c0e15a407a82dc1e.tar.bz2
New testcase for PR450
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16670 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/C++Frontend')
-rw-r--r--test/C++Frontend/2004-10-04-ExternalGlobalConstant.cpp.tr12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/C++Frontend/2004-10-04-ExternalGlobalConstant.cpp.tr b/test/C++Frontend/2004-10-04-ExternalGlobalConstant.cpp.tr
new file mode 100644
index 0000000..48e7240
--- /dev/null
+++ b/test/C++Frontend/2004-10-04-ExternalGlobalConstant.cpp.tr
@@ -0,0 +1,12 @@
+// RUN: %llvmgcc -xc++ -S -o - %s | grep %y | not grep constant
+
+struct Y {
+ int A;
+ Y();
+};
+
+// This global cannot be marked 'constant' because the ctor can modify it.
+extern const Y y;
+
+void foo(...);
+int bar() { foo(&y); }