2018-05-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / guality / pr56154-2.c
blob6c1d5d977f8c4ec8b40f7c3cd3dbf1c7397df9d6
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 __attribute__((noinline, noclone)) int
11 foo (int x)
13 asm ("");
14 x++;
15 asm ("");
16 x++;
17 asm ("");
18 x++;
19 asm ("");
20 x++;
21 asm ("");
22 x++;
23 asm ("");
24 x++;
25 asm ("");
26 x++;
27 asm ("");
28 x++;
29 asm (NOP : : : "memory");
30 asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-2.c:30 "x" "28" } } */
31 return x;
34 void
35 test_main (void)
37 if (foo (20) != 28)
38 abort ();