Debian Codegraph @

gcc/testsuite/gcc.dg/guality/pr56154-2.c

raw
1 /* PR debug/56154 */
2 /* { dg-do run } */
3 /* { dg-options "-g" } */
4 /* { dg-additional-sources "pr56154-aux.c" } */
5
6 #include "../nop.h"
7
8 extern void abort (void);
9
10 __attribute__((noinline, noclone)) int
11 foo (int x)
12 {
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;
32 }
33
34 void
35 test_main (void)
36 {
37 if (foo (20) != 28)
38 abort ();
39 }