2018-05-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / guality / pr56154-4.c
blobbfe7338d62c9665f31a4c90d9e2897153f2b5be2
1 /* PR debug/56154 */
2 /* { dg-do run } */
3 /* { dg-options "-g" } */
4 /* { dg-additional-sources "pr56154-aux.c" } */
6 #include "../nop.h"
8 extern void abort (void);
10 volatile int z;
12 __attribute__((noinline, noclone)) int
13 foo (int x)
15 z = 6;
16 x++;
17 x++;
18 x++;
19 x++;
20 x++;
21 x++;
22 x++;
23 x++;
24 asm (NOP : : : "memory");
25 asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-4.c:25 "x" "28" } } */
26 return x;
29 void
30 test_main (void)
32 if (foo (20) != 28)
33 abort ();