diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-03-30 03:55:31 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-03-30 03:55:31 +0000 |
commit | 5fe61c6cb09a5a2d2ecddfb74f8b253d9d462165 (patch) | |
tree | 0f3d269e500a9c76675a400212ef76b2da5ab048 /test/CodeGenCXX/const-init-cxx11.cpp | |
parent | 38ac243e300798e8cd9fe05888cd97beabfb94e6 (diff) |
ConstStructBuilder: fix offset math for base classes so it works correctly in general. Found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153720 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/const-init-cxx11.cpp')
-rw-r--r-- | test/CodeGenCXX/const-init-cxx11.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/CodeGenCXX/const-init-cxx11.cpp b/test/CodeGenCXX/const-init-cxx11.cpp index 8d92b81feb..c6250c6d96 100644 --- a/test/CodeGenCXX/const-init-cxx11.cpp +++ b/test/CodeGenCXX/const-init-cxx11.cpp @@ -78,6 +78,11 @@ namespace BaseClass { struct Test2 : X<E,0>, X<E,1>, X<E,2>, X<E,3> {}; // CHECK: @_ZN9BaseClass2t2E = constant {{.*}} undef extern constexpr Test2 t2 = Test2(); + + struct __attribute((packed)) PackedD { double y = 2; }; + struct Test3 : C, PackedD { constexpr Test3() {} }; + // CHECK: @_ZN9BaseClass2t3E = constant <{ i8, double }> <{ i8 1, double 2.000000e+00 }> + extern constexpr Test3 t3 = Test3(); } namespace Array { |