aboutsummaryrefslogtreecommitdiff
path: root/test/C++Frontend/2003-08-31-StructLayout.cpp
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
commit483cb5126f06a2b922f277e5c014495924ce7f23 (patch)
tree4938f44dc6591594ddbdabfbf61e51d23ae93d22 /test/C++Frontend/2003-08-31-StructLayout.cpp
parentc6c804b0d2b858d5ecded8c29fe6b086404ec0c9 (diff)
New testcase for annoying structure layout stuff!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/C++Frontend/2003-08-31-StructLayout.cpp')
-rw-r--r--test/C++Frontend/2003-08-31-StructLayout.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/C++Frontend/2003-08-31-StructLayout.cpp b/test/C++Frontend/2003-08-31-StructLayout.cpp
new file mode 100644
index 0000000000..78d8d33e87
--- /dev/null
+++ b/test/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;