gcc/testsuite/g++.dg/opt/float1.C
raw| 1 | // PR optimization/11637 |
| 2 | // Origin: <[email protected]> |
| 3 | |
| 4 | // This used to fail to assemble on x86 because a decimal |
| 5 | // floating point litteral was emitted, which originated |
| 6 | // from a bogus REG_EQUAL note not removed by the combiner. |
| 7 | |
| 8 | // { dg-do assemble } |
| 9 | // { dg-options "-O2 -fnon-call-exceptions" } |
| 10 | |
| 11 | void f(long int seed); |
| 12 | |
| 13 | void g(float &o) |
| 14 | { |
| 15 | float a = 0.05f; |
| 16 | float b = 1.0 - a; |
| 17 | float c = 1.0 + a; |
| 18 | |
| 19 | f(0); |
| 20 | o = a; |
| 21 | } |