[llvm-commits] CVS: llvm/test/Regression/C++Frontend/2004-10-04-ExternalGlobalConstant.cpp.tr
Chris Lattner
lattner at cs.uiuc.edu
Mon Oct 4 17:18:34 PDT 2004
Changes in directory llvm/test/Regression/C++Frontend:
2004-10-04-ExternalGlobalConstant.cpp.tr added (r1.1)
---
Log message:
New testcase for PR450: http://llvm.cs.uiuc.edu/PR450
---
Diffs of the changes: (+12 -0)
Index: llvm/test/Regression/C++Frontend/2004-10-04-ExternalGlobalConstant.cpp.tr
diff -c /dev/null llvm/test/Regression/C++Frontend/2004-10-04-ExternalGlobalConstant.cpp.tr:1.1
*** /dev/null Mon Oct 4 19:18:31 2004
--- llvm/test/Regression/C++Frontend/2004-10-04-ExternalGlobalConstant.cpp.tr Mon Oct 4 19:18:21 2004
***************
*** 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); }
More information about the llvm-commits
mailing list