2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr46491.c
blob82f704c266f74fd4f3bd4dd22ed85fca0a36f630
1 /* PR tree-optimization/46491 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
5 extern void abort (void);
7 __attribute__((noinline)) int
8 foo (int *p)
10 int r;
11 asm ("movl $6, (%1)\n\txorl %0, %0" : "=r" (r) : "r" (p) : "memory");
12 return r;
15 int
16 main (void)
18 int p = 8;
19 if ((foo (&p) ? : p) != 6)
20 abort ();
21 return 0;