111
|
1 /* { dg-do compile } */
|
131
|
2 /* { dg-options "-O2 -fno-store-merging" } */
|
145
|
3 /* { dg-additional-options "-fno-common -mdynamic-no-pic" { target { ia32 && { x86_64-*-darwin* i?86-*-darwin* } } } } */
|
111
|
4
|
|
5 struct B {
|
|
6 B() {}
|
|
7 int x;
|
|
8 int a : 6;
|
|
9 int b : 6;
|
|
10 int c : 6;
|
|
11 };
|
|
12
|
|
13 struct C : B {
|
|
14 char d;
|
|
15 };
|
|
16
|
|
17 C c;
|
|
18
|
|
19 int main()
|
|
20 {
|
|
21 /* We have to make sure to not cause a store data race between
|
|
22 c.c and c.d residing in the tail padding of B. */
|
|
23 c.c = 1;
|
|
24 c.d = 2;
|
|
25 }
|
|
26
|
|
27 /* In particular on x86 c.d should not be loaded/stored via movl. */
|
|
28 /* { dg-final { scan-assembler-not "movl" { target { x86_64-*-* i?86-*-* } } } } */
|