| 1 |
// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-linux-gnu %s |
| 2 |
// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-linux-gnu -fms-layout-compatibility=microsoft %s |
| 3 |
// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-windows-gnu %s |
| 4 |
// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-windows-gnu -fms-layout-compatibility=itanium %s |
| 5 |
|
| 6 |
struct { |
| 7 |
int a : 24; |
| 8 |
char b : 8; |
| 9 |
} __attribute__((gcc_struct)) t1; |
| 10 |
_Static_assert(sizeof(t1) == 4, ""); |
| 11 |
|
| 12 |
#pragma ms_struct on |
| 13 |
struct { |
| 14 |
int a : 24; |
| 15 |
char b : 8; |
| 16 |
} __attribute__((gcc_struct)) t2; |
| 17 |
_Static_assert(sizeof(t2) == 4, ""); |
| 18 |
#pragma ms_struct off |