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