gcc/testsuite/gcc.c-torture/execute/20030117-1.c
raw| 1 | void abort (void); |
| 2 | void exit (int); |
| 3 | |
| 4 | int foo (int, int, int); |
| 5 | int bar (int, int, int); |
| 6 | |
| 7 | int main (void) |
| 8 | { |
| 9 | if (foo (5, 10, 21) != 12) |
| 10 | abort (); |
| 11 | |
| 12 | if (bar (9, 12, 15) != 150) |
| 13 | abort (); |
| 14 | |
| 15 | exit (0); |
| 16 | } |
| 17 | |
| 18 | int foo (int x, int y, int z) |
| 19 | { |
| 20 | return (x + y + z) / 3; |
| 21 | } |
| 22 | |
| 23 | int bar (int x, int y, int z) |
| 24 | { |
| 25 | return foo (x * x, y * y, z * z); |
| 26 | } |