2018-05-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / guality / pr54519-4.c
blobd2765d148c2ff4146d49ca729d0b87f006281792
1 /* PR debug/54519 */
2 /* { dg-do run } */
3 /* { dg-options "-g" } */
5 __attribute__((noinline, noclone)) void
6 fn1 (int x)
8 __asm volatile ("" : "+r" (x) : : "memory");
11 static int
12 fn2 (int x, int y)
14 if (y)
16 fn1 (x); /* { dg-final { gdb-test 17 "x" "6" } } */
17 fn1 (x); /* { dg-final { gdb-test 17 "y" "25" } } */
18 fn1 (x);
19 fn1 (x);
20 y = -2 + x;
21 y = y * y * y + y;
22 fn1 (x + y); /* { dg-final { gdb-test 22 "y" "68" } } */
24 return x;
27 int (*p) (int, int) = fn2;
29 int
30 main ()
32 __asm volatile ("" : : : "memory");
33 int (*q) (int, int) = p;
34 __asm volatile ("" : : : "memory");
35 q (6, 25);
36 q (4, 117);
37 q (0, 0);
38 return 0;