2018-05-21 22:28:43 +08:00
|
|
|
// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -fdump-record-layouts %s \
|
|
|
|
// RUN: | FileCheck %s
|
|
|
|
|
|
|
|
struct S {
|
|
|
|
char x;
|
|
|
|
int y;
|
|
|
|
} __attribute__((packed, aligned(8)));
|
|
|
|
|
|
|
|
struct alignas(8) T {
|
|
|
|
char x;
|
|
|
|
int y;
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
|
|
S s;
|
|
|
|
T t;
|
|
|
|
// CHECK: 0 | struct T
|
|
|
|
// CHECK-NEXT: 0 | char x
|
|
|
|
// CHECK-NEXT: 1 | int y
|
2020-10-09 03:21:02 +08:00
|
|
|
// CHECK-NEXT: | [sizeof=8, dsize=8, align=8,{{( preferredalign=8,)?}}
|
|
|
|
// CHECK-NEXT: | nvsize=8, nvalign=8{{(, preferrednvalign=8)?}}]
|
2018-05-21 22:28:43 +08:00
|
|
|
|
|
|
|
// CHECK: 0 | struct S
|
|
|
|
// CHECK-NEXT: 0 | char x
|
|
|
|
// CHECK-NEXT: 1 | int y
|
2020-10-09 03:21:02 +08:00
|
|
|
// CHECK-NEXT: | [sizeof=8, dsize=8, align=8,{{( preferredalign=8,)?}}
|
|
|
|
// CHECK-NEXT: | nvsize=8, nvalign=8{{(, preferrednvalign=8)?}}]
|