Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / gcc / testsuite / gcc.dg / guality / pr56154-4.c
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 volatile int z;
11
12 __attribute__((noinline, noclone)) int
13 foo (int x)
14 {
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;
27 }
28
29 void
30 test_main (void)
31 {
32   if (foo (20) != 28)
33     abort ();
34 }