gcc/testsuite/gcc.c-torture/execute/930106-1.c
raw| 1 | /* { dg-add-options stack_size } */ |
| 2 | /* { dg-additional-options "-std=gnu89" } */ |
| 3 | |
| 4 | #if defined (STACK_SIZE) |
| 5 | #define DUMMY_SIZE 9 |
| 6 | #else |
| 7 | #define DUMMY_SIZE 399999 |
| 8 | #endif |
| 9 | |
| 10 | double g() |
| 11 | { |
| 12 | return 1.0; |
| 13 | } |
| 14 | |
| 15 | f() |
| 16 | { |
| 17 | char dummy[DUMMY_SIZE]; |
| 18 | double f1, f2, f3; |
| 19 | f1 = g(); |
| 20 | f2 = g(); |
| 21 | f3 = g(); |
| 22 | return f1 + f2 + f3; |
| 23 | } |
| 24 | |
| 25 | main() |
| 26 | { |
| 27 | if (f() != 3.0) |
| 28 | abort(); |
| 29 | exit(0); |
| 30 | } |