diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:44:14 +0000 |
commit | 2b6b257f4e5503a7a2675bdb8735693db769f75c (patch) | |
tree | e85e046ae7003fe3bcc8b5454cd0fa3f7407b470 /test/CodeGen/ms-volatile.c | |
parent | b4348ed0b7e90c0831b925fbee00b5f179a99796 (diff) |
Notes
Diffstat (limited to 'test/CodeGen/ms-volatile.c')
-rw-r--r-- | test/CodeGen/ms-volatile.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/test/CodeGen/ms-volatile.c b/test/CodeGen/ms-volatile.c index 87393e794f82..a3ef35a3faad 100644 --- a/test/CodeGen/ms-volatile.c +++ b/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 @@ -52,11 +59,29 @@ void test7(volatile struct bar *p, volatile struct bar *q) { void test8(volatile double *p, volatile double *q) { *p = *q; // CHECK-LABEL: @test8 - // CHECK: load atomic volatile {{.*}} acquire - // CHECK: store atomic volatile {{.*}}, {{.*}} release + // CHECK: load volatile {{.*}} + // CHECK: store volatile {{.*}}, {{.*}} } void test9(volatile baz *p, baz *q) { *p = *q; // CHECK-LABEL: @test9 + // CHECK: store volatile {{.*}}, {{.*}} + // CHECK: store volatile {{.*}}, {{.*}} +} +void test10(volatile long long *p, volatile long long *q) { + *p = *q; + // CHECK-LABEL: @test10 + // CHECK: load volatile {{.*}} + // CHECK: store volatile {{.*}}, {{.*}} +} +void test11(volatile float *p, volatile float *q) { + *p = *q; + // CHECK-LABEL: @test11 + // CHECK: load atomic volatile {{.*}} acquire // CHECK: store atomic volatile {{.*}}, {{.*}} release } +int test12(struct qux *p) { + return p->f; + // CHECK-LABEL: @test12 + // CHECK: load volatile {{.*}} +} |