gcc/testsuite/gcc.c-torture/execute/20101025-1.c
raw| 1 | void abort (void); |
| 2 | void exit (int); |
| 3 | |
| 4 | static int g_7; |
| 5 | static int *volatile g_6 = &g_7; |
| 6 | int g_3; |
| 7 | |
| 8 | static int f1 (int *p_58) |
| 9 | { |
| 10 | return *p_58; |
| 11 | } |
| 12 | |
| 13 | void f2 (int i) __attribute__ ((noinline)); |
| 14 | void f2 (int i) |
| 15 | { |
| 16 | g_3 = i; |
| 17 | } |
| 18 | |
| 19 | int f3 (void) __attribute__ ((noinline)); |
| 20 | int f3 (void) |
| 21 | { |
| 22 | *g_6 = 1; |
| 23 | f2 (f1 (&g_7)); |
| 24 | return 0; |
| 25 | } |
| 26 | |
| 27 | int main () |
| 28 | { |
| 29 | f3 (); |
| 30 | if (g_3 != 1) |
| 31 | abort (); |
| 32 | exit (0); |
| 33 | } |