gcc/testsuite/gcc.dg/torture/pr117330-1.c
raw| 1 | /* { dg-do compile } */ |
| 2 | |
| 3 | /* This used to ICE during vectorization |
| 4 | dealing with the removal of comparisons inside COND_EXPR. */ |
| 5 | /* PR tree-optimization/117330 */ |
| 6 | |
| 7 | |
| 8 | enum psi_states { |
| 9 | PSI_IO_NONE, |
| 10 | PSI_IO_ONE, |
| 11 | PSI_IO_TWO, |
| 12 | }; |
| 13 | void f(unsigned *times, |
| 14 | unsigned *times1, |
| 15 | unsigned state_mask) { |
| 16 | enum psi_states s; |
| 17 | for (s = 0; s < 2; s++) { |
| 18 | if (state_mask & (1 << s)) |
| 19 | times[s] += 1; |
| 20 | times[s] = times[s] - times1[s]; |
| 21 | } |
| 22 | } |