PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr46309.c
blob46e10ab4bf43a0e090c268c7585b4dbefa0897b6
1 /* PR tree-optimization/46309 */
3 extern void abort (void);
5 unsigned int *q;
7 __attribute__((noinline, noclone)) void
8 bar (unsigned int *p)
10 if (*p != 2 && *p != 3)
11 (!(!(*q & 263) || *p != 1)) ? abort () : 0;
14 int
15 main ()
17 unsigned int x, y;
18 asm volatile ("" : : : "memory");
19 x = 2;
20 bar (&x);
21 x = 3;
22 bar (&x);
23 y = 1;
24 x = 0;
25 q = &y;
26 bar (&x);
27 y = 0;
28 x = 1;
29 bar (&x);
30 return 0;