gcc/testsuite/g++.dg/opt/pr93292.C
raw| 1 | // PR tree-optimization/93292 |
| 2 | // { dg-do compile } |
| 3 | // { dg-options "-O3 -w" } |
| 4 | |
| 5 | struct A { |
| 6 | static int foo (float x) { static int b; b = x ? x + 0.5 : 0; return b; } |
| 7 | }; |
| 8 | |
| 9 | void |
| 10 | bar (int *d, float e) |
| 11 | { |
| 12 | float g; |
| 13 | for (int h = 0; h < 64; h++) |
| 14 | { |
| 15 | d[h] += A::foo (g < 0 ? : g > 5 ? : g); |
| 16 | A::foo (e); |
| 17 | } |
| 18 | } |