gcc/testsuite/gcc.dg/pr91181.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-Ofast" } */ |
| 3 | /* { dg-additional-options "-mavx" { target x86_64-*-* i?86-*-* } } */ |
| 4 | |
| 5 | enum { a, b, c }; |
| 6 | float *d, *e; |
| 7 | int f, g, h, i; |
| 8 | int j() |
| 9 | { |
| 10 | float a; |
| 11 | for (; h; h++) |
| 12 | { |
| 13 | i = h * 4; |
| 14 | a = d[i + b]; |
| 15 | if (a) { |
| 16 | e[i + b] = g < d[i + b] * f * a ? g : d[i + b] * f * a; |
| 17 | e[i + c] = g < d[i + c] * f * a ? g : d[i + c] * f * a; |
| 18 | } |
| 19 | e[i + b] = e[i + c]; |
| 20 | } |
| 21 | } |