summaryrefslogtreecommitdiffstats
path: root/llvm/test/Regression/C++Frontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-31 06:53:05 +0000
committerChris Lattner <sabre@nondot.org>2003-08-31 06:53:05 +0000
commit63bb3005c078033e8165d44e4ddbeb957a56b1ba (patch)
treed396b88eca60078bf3ec56cb0c1323e4f022467e /llvm/test/Regression/C++Frontend
parent93d4087a64ec4c050dcdf35e4653944822e89279 (diff)
downloadbcm5719-llvm-63bb3005c078033e8165d44e4ddbeb957a56b1ba.tar.gz
bcm5719-llvm-63bb3005c078033e8165d44e4ddbeb957a56b1ba.zip
New testcase for annoying structure layout stuff!
llvm-svn: 8252
Diffstat (limited to 'llvm/test/Regression/C++Frontend')
-rw-r--r--llvm/test/Regression/C++Frontend/2003-08-31-StructLayout.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Regression/C++Frontend/2003-08-31-StructLayout.cpp b/llvm/test/Regression/C++Frontend/2003-08-31-StructLayout.cpp
new file mode 100644
index 00000000000..78d8d33e874
--- /dev/null
+++ b/llvm/test/Regression/C++Frontend/2003-08-31-StructLayout.cpp
@@ -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;
OpenPOWER on IntegriCloud