New testcase for annoying structure layout stuff!
authorChris Lattner <sabre@nondot.org>
Sun, 31 Aug 2003 06:53:05 +0000 (06:53 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 31 Aug 2003 06:53:05 +0000 (06:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8252 91177308-0d34-0410-b5e6-96231b3b80d8

test/C++Frontend/2003-08-31-StructLayout.cpp [new file with mode: 0644]

diff --git a/test/C++Frontend/2003-08-31-StructLayout.cpp b/test/C++Frontend/2003-08-31-StructLayout.cpp
new file mode 100644 (file)
index 0000000..78d8d33
--- /dev/null
@@ -0,0 +1,14 @@
+// There is a HOLE in the derived2 object due to not wanting to place the two 
+// baseclass instances at the same offset!
+
+struct baseclass {};
+
+class derived1 : public baseclass {
+  void * NodePtr;
+};
+
+class derived2 : public baseclass {
+  derived1 current;
+};
+
+derived2 RI;