gcc/testsuite/gcc.c-torture/execute/930603-1.c
raw| 1 | /* { dg-additional-options "-std=gnu89" } */ |
| 2 | |
| 3 | float fx (x) |
| 4 | float x; |
| 5 | { |
| 6 | return 1.0 + 3.0 / (2.302585093 * x); |
| 7 | } |
| 8 | |
| 9 | main () |
| 10 | { |
| 11 | float fx (), inita (), initc (), a, b, c; |
| 12 | a = inita (); |
| 13 | c = initc (); |
| 14 | f (); |
| 15 | b = fx (c) + a; |
| 16 | f (); |
| 17 | if (a != 3.0 || b < 4.3257 || b > 4.3258 || c != 4.0) |
| 18 | abort (); |
| 19 | exit (0); |
| 20 | } |
| 21 | |
| 22 | float inita () { return 3.0; } |
| 23 | float initc () { return 4.0; } |
| 24 | f () {} |