gcc/testsuite/gcc.c-torture/compile/20020926-1.c
raw| 1 | /* PR c/7160 */ |
| 2 | /* Verify that the register-to-stack converter properly handles |
| 3 | branches without return value containing function calls. */ |
| 4 | |
| 5 | extern int gi; |
| 6 | |
| 7 | extern int foo1(int, int); |
| 8 | extern void foo2(int, int); |
| 9 | extern float foo3(int); |
| 10 | |
| 11 | float bar(int i1, int i2) |
| 12 | { |
| 13 | int i3; |
| 14 | |
| 15 | if (i2) { |
| 16 | i3 = foo1(i1, gi); |
| 17 | foo2(i1, i3); |
| 18 | } |
| 19 | else |
| 20 | return foo3(i2); |
| 21 | } |