diff options
| author | Chris Lattner <sabre@nondot.org> | 2005-01-03 22:27:58 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2005-01-03 22:27:58 +0000 |
| commit | 91197b0b6a6dff0eb9359b50a272e8e270312723 (patch) | |
| tree | 1f7fc2dbb168b39f22c4e870aa9f2787efa06942 | |
| parent | 5dfdadde045374525e3e0990b71379ca08ce1c2f (diff) | |
| download | bcm5719-llvm-91197b0b6a6dff0eb9359b50a272e8e270312723.tar.gz bcm5719-llvm-91197b0b6a6dff0eb9359b50a272e8e270312723.zip | |
Add a testcase to check that initializer that CAN be evaluated statically ARE.
These used to result in dynamic initializations.
llvm-svn: 19278
| -rw-r--r-- | llvm/test/Regression/C++Frontend/2005-01-03-StaticInitializers.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/Regression/C++Frontend/2005-01-03-StaticInitializers.cpp b/llvm/test/Regression/C++Frontend/2005-01-03-StaticInitializers.cpp new file mode 100644 index 00000000000..b215d3e3dab --- /dev/null +++ b/llvm/test/Regression/C++Frontend/2005-01-03-StaticInitializers.cpp @@ -0,0 +1,8 @@ +// RUN: %llvmgxx %s -S -o - | grep '%XX = global int 4' + +struct S { + int A[2]; +}; + +int XX = (int)&(((struct S*)0)->A[1]); + |

