1 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -emit-pch -o %t.pch %s
2 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fdelayed-template-parsing -emit-pch -o %t.delayed.pch %s
3 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -DMAIN_FILE \
4 // RUN: -include-pch %t.pch \
5 // RUN: -emit-llvm -verify -o - %s | FileCheck %s
6 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -DMAIN_FILE -fdelayed-template-parsing \
7 // RUN: -include-pch %t.delayed.pch \
8 // RUN: -emit-llvm -verify -o - %s | FileCheck %s
12 extern "C" void consume(int b
);
24 #pragma pack(push, slot1, 2)
26 char a
; // +1 byte of padding
28 char c
; // +1 byte of padding
34 char a
; // +3 bytes of padding
36 char c
; // +3 bytes of padding
40 #pragma pack(push, 16)
42 char a
; // +7 bytes of padding
44 char c
; // +7 bytes of padding
48 #pragma pack(pop, slot1) // This should return packing to 1 (established before push(slot1))
49 struct packedAfterPopBackTo1
{
57 consume(sizeof(packedAt1
)); // 18
58 consume(sizeof(packedAt2
)); // 20
59 consume(sizeof(packedAt4
)); // 24
60 consume(sizeof(packedAt16
)); // 32
61 consume(sizeof(packedAfterPopBackTo1
)); // 18 again
66 // CHECK-LABEL: define linkonce_odr dso_local void @"??$function@$0A@@@YAXXZ"(
67 // CHECK: call void @consume(i32 noundef 18)
68 // CHECK-NEXT: call void @consume(i32 noundef 20)
69 // CHECK-NEXT: call void @consume(i32 noundef 24)
70 // CHECK-NEXT: call void @consume(i32 noundef 32)
71 // CHECK-NEXT: call void @consume(i32 noundef 18)
76 // expected-no-diagnostics