blob: b550b5fdb013389d8696122a6f590ac5ad1aca89 [file] [log] [blame]
Dan Gohman2d65d352009-08-25 15:38:29 +00001// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
3#ifdef PACKED
4#define P __attribute__((packed))
5#else
6#define P
7#endif
8
9struct UnPacked {
10 int X;
11 int Y;
12};
13
14struct P M_Packed {
15 unsigned char A;
16 struct UnPacked B;
17};
18
19struct M_Packed sM_Packed;
20
21int testM_Packed (void) {
22 struct M_Packed x;
23 return (x.B.Y != 0);
24}
25