etc/services - sync with NetBSD-8
[minix.git] / external / bsd / llvm / dist / clang / test / Layout / ms-x86-empty-layout.c
blobfaca0be0a9c0e41889a579f725886f4737c3c07d
1 // RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
2 // RUN: | FileCheck %s
3 // RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
4 // RUN: | FileCheck %s
6 struct EmptyIntMemb {
7 int FlexArrayMemb[0];
8 };
9 // CHECK: *** Dumping AST Record Layout
10 // CHECK: Type: struct EmptyIntMemb
11 // CHECK: Record:
12 // CHECK: Layout: <ASTRecordLayout
13 // CHECK: Size:32
14 // CHECK: Alignment:32
15 // CHECK: FieldOffsets: [0]>
17 struct EmptyLongLongMemb {
18 long long FlexArrayMemb[0];
20 // CHECK: *** Dumping AST Record Layout
21 // CHECK: Type: struct EmptyLongLongMemb
22 // CHECK: Record:
23 // CHECK: Layout: <ASTRecordLayout
24 // CHECK: Size:32
25 // CHECK: Alignment:64
26 // CHECK: FieldOffsets: [0]>
28 struct EmptyAligned2LongLongMemb {
29 long long __declspec(align(2)) FlexArrayMemb[0];
32 // CHECK: *** Dumping AST Record Layout
33 // CHECK: Type: struct EmptyAligned2LongLongMemb
34 // CHECK: Record:
35 // CHECK: Layout: <ASTRecordLayout
36 // CHECK: Size:32
37 // CHECK: Alignment:64
38 // CHECK: FieldOffsets: [0]>
40 struct EmptyAligned8LongLongMemb {
41 long long __declspec(align(8)) FlexArrayMemb[0];
44 // CHECK: *** Dumping AST Record Layout
45 // CHECK: Type: struct EmptyAligned8LongLongMemb
46 // CHECK: Record:
47 // CHECK: Layout: <ASTRecordLayout
48 // CHECK: Size:64
49 // CHECK: Alignment:64
50 // CHECK: FieldOffsets: [0]>
52 #pragma pack(1)
53 struct __declspec(align(4)) EmptyPackedAligned4LongLongMemb {
54 long long FlexArrayMemb[0];
56 #pragma pack()
58 // CHECK: *** Dumping AST Record Layout
59 // CHECK: Type: struct EmptyPackedAligned4LongLongMemb
60 // CHECK: Record:
61 // CHECK: Layout: <ASTRecordLayout
62 // CHECK: Size:32
63 // CHECK: Alignment:32
64 // CHECK: FieldOffsets: [0]>
66 #pragma pack(1)
67 struct EmptyPackedAligned8LongLongMemb {
68 long long __declspec(align(8)) FlexArrayMemb[0];
70 #pragma pack()
72 // CHECK: *** Dumping AST Record Layout
73 // CHECK: Type: struct EmptyPackedAligned8LongLongMemb
74 // CHECK: Record:
75 // CHECK: Layout: <ASTRecordLayout
76 // CHECK: Size:64
77 // CHECK: Alignment:64
78 // CHECK: FieldOffsets: [0]>
81 int a[
82 sizeof(struct EmptyIntMemb)+
83 sizeof(struct EmptyLongLongMemb)+
84 sizeof(struct EmptyAligned2LongLongMemb)+
85 sizeof(struct EmptyAligned8LongLongMemb)+
86 sizeof(struct EmptyPackedAligned4LongLongMemb)+
87 sizeof(struct EmptyPackedAligned8LongLongMemb)+
88 0];