aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/class-layout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/class-layout.cpp')
-rw-r--r--test/CodeGenCXX/class-layout.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/CodeGenCXX/class-layout.cpp b/test/CodeGenCXX/class-layout.cpp
index 21e1a2b40f04..d7d84a86abad 100644
--- a/test/CodeGenCXX/class-layout.cpp
+++ b/test/CodeGenCXX/class-layout.cpp
@@ -39,7 +39,7 @@ namespace Test5 {
char a;
};
- // CHECK: %"struct.Test5::B" = type { [9 x i8], i8, i8, [5 x i8] }
+ // CHECK: %"struct.Test5::B" = type { %"struct.Test5::A.base", i8, i8, [5 x i8] }
struct B : A {
char b : 1;
char c;
@@ -91,3 +91,12 @@ namespace Test7 {
B* b;
#pragma pack ()
}
+
+// Shouldn't crash.
+namespace Test8 {
+ struct A {};
+ struct D { int a; };
+ struct B : virtual D, A { };
+ struct C : B, A { void f() {} };
+ C c;
+}