aboutsummaryrefslogtreecommitdiffstats
path: root/test/C++Frontend/2003-08-31-StructLayout.cpp
blob: 21d504c771d4bb1c53bf4d8a9ce898508cba6c7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null

// 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;