OSDN Git Service

* params.h (ALLOW_STORE_DATA_RACES): New.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / c-c++-common / cxxbitfields-5.c
1 /* { dg-do compile { target i?86-*-* x86_64-*-* } } */
2 /* { dg-options "-O2 --param allow-store-data-races=0" } */
3
4 #include <stdlib.h>
5
6 struct bits
7 {
8   char a;
9   int b:7;
10   int c:9;
11   unsigned char d;
12 } x;
13
14 struct bits *p;
15
16 static void allocit()
17 {
18   p = (struct bits *) malloc (sizeof (struct bits));
19 }
20
21 /* Store into <c> should not clobber <d>.  */
22 /* We should not use a 32-bit move to store into p->, but a smaller move.  */
23 void foo()
24 {
25   allocit();
26   p -> c = 55;
27 }
28
29 /* { dg-final { scan-assembler-not "movl\t\\(" } } */