diff options
Diffstat (limited to 'clang/test/CodeGen/ms-volatile.c')
-rw-r--r-- | clang/test/CodeGen/ms-volatile.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/clang/test/CodeGen/ms-volatile.c b/clang/test/CodeGen/ms-volatile.c index 242ce067d62..a3ef35a3faa 100644 --- a/clang/test/CodeGen/ms-volatile.c +++ b/clang/test/CodeGen/ms-volatile.c @@ -7,6 +7,13 @@ struct bar { }; typedef _Complex float __declspec(align(8)) baz; +#pragma pack(push) +#pragma pack(1) +struct qux { + volatile int f; +}; +#pragma pack(pop) + void test1(struct foo *p, struct foo *q) { *p = *q; // CHECK-LABEL: @test1 @@ -58,7 +65,8 @@ void test8(volatile double *p, volatile double *q) { void test9(volatile baz *p, baz *q) { *p = *q; // CHECK-LABEL: @test9 - // CHECK: store atomic volatile {{.*}}, {{.*}} release + // CHECK: store volatile {{.*}}, {{.*}} + // CHECK: store volatile {{.*}}, {{.*}} } void test10(volatile long long *p, volatile long long *q) { *p = *q; @@ -72,3 +80,8 @@ void test11(volatile float *p, volatile float *q) { // CHECK: load atomic volatile {{.*}} acquire // CHECK: store atomic volatile {{.*}}, {{.*}} release } +int test12(struct qux *p) { + return p->f; + // CHECK-LABEL: @test12 + // CHECK: load volatile {{.*}} +} |