Files
archived-llvm-mirror/test/Regression/C++Frontend/2005-01-03-StaticInitializers.cpp
Chris Lattner 747c1e726d Add a testcase to check that initializer that CAN be evaluated statically ARE.
These used to result in dynamic initializations.

llvm-svn: 19278
2005-01-03 22:27:58 +00:00

9 lines
125 B
C++

// RUN: %llvmgxx %s -S -o - | grep '%XX = global int 4'
struct S {
int A[2];
};
int XX = (int)&(((struct S*)0)->A[1]);