Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / pr25654.c
blob2d7ef221f3cab92552e491b65a73c037ef28854a
1 /* { dg-do run } */
2 /* { dg-require-effective-target ilp32 } */
3 /* { dg-options "-O2 -mpreferred-stack-boundary=2 -march=i686 -frename-registers" } */
5 extern void abort (void) __attribute__((noreturn));
7 struct wrapper {
8 union setconflict
10 short a[20];
11 int b[10];
12 } a;
15 int
16 main ()
18 int sum = 0;
20 struct wrapper a;
21 short *c;
22 c = a.a.a;
23 asm ("": "=r" (c):"0" (c));
24 *c = 0;
25 asm ("": "=r" (c):"0" (c));
26 sum += *c;
29 struct wrapper a;
30 int *c;
31 c = a.a.b;
32 asm ("": "=r" (c):"0" (c));
33 *c = 1;
34 asm ("": "=r" (c):"0" (c));
35 sum += *c;
38 if (sum != 1)
39 abort();
40 return 0;