diff options
Diffstat (limited to 'test/C++Frontend')
-rw-r--r-- | test/C++Frontend/2004-10-04-ExternalGlobalConstant.cpp.tr | 12 |
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); } |