annotate gcc/testsuite/g++.dg/pr71694.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 /* { dg-options "-O2 -fno-store-merging" } */
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 struct B {
kono
parents:
diff changeset
5 B() {}
kono
parents:
diff changeset
6 int x;
kono
parents:
diff changeset
7 int a : 6;
kono
parents:
diff changeset
8 int b : 6;
kono
parents:
diff changeset
9 int c : 6;
kono
parents:
diff changeset
10 };
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 struct C : B {
kono
parents:
diff changeset
13 char d;
kono
parents:
diff changeset
14 };
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 C c;
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 int main()
kono
parents:
diff changeset
19 {
kono
parents:
diff changeset
20 /* We have to make sure to not cause a store data race between
kono
parents:
diff changeset
21 c.c and c.d residing in the tail padding of B. */
kono
parents:
diff changeset
22 c.c = 1;
kono
parents:
diff changeset
23 c.d = 2;
kono
parents:
diff changeset
24 }
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 /* In particular on x86 c.d should not be loaded/stored via movl. */
kono
parents:
diff changeset
27 /* { dg-final { scan-assembler-not "movl" { target { x86_64-*-* i?86-*-* } } } } */