PR middle-end/22141
[official-gcc.git] / gcc / testsuite / g++.dg / pr71694.C
blob0a8baf230bfeec51900b9fdd77d140d7c6fb4986
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fno-store-merging" } */
4 struct B {
5     B() {}
6     int x;
7     int a : 6;
8     int b : 6;
9     int c : 6;
12 struct C : B {
13     char d;
16 C c;
18 int main()
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;
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-*-* } } } } */