Merge from mainline.
[llvm-complete.git] / test / C++Frontend / 2007-04-05-StructPackedFieldUnpacked.cpp
blob52e247133769d8bf0fc2f9dd86382dfc2064a3e9
1 // RUN: %llvmgxx -S %s -o - | llvm-as -f -o /dev/null
3 #ifdef PACKED
4 #define P __attribute__((packed))
5 #else
6 #define P
7 #endif
9 struct UnPacked {
10 int X;
11 int Y;
14 struct P M_Packed {
15 unsigned char A;
16 struct UnPacked B;
17 };
19 struct M_Packed sM_Packed;
21 int testM_Packed (void) {
22 struct M_Packed x;
23 return (x.B.Y != 0);