gcc/testsuite/gcc.dg/vect/vect-early-break_123-pr114297.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-add-options vect_early_break } */ |
| 3 | /* { dg-require-effective-target vect_early_break } */ |
| 4 | |
| 5 | void h() __attribute__((__noreturn__)); |
| 6 | struct Extremes { |
| 7 | int w; |
| 8 | int h; |
| 9 | }; |
| 10 | struct Extremes *array; |
| 11 | int f(int num, int size1) |
| 12 | { |
| 13 | int sw = 0, sh = 0; |
| 14 | for (int i = 0; i < size1; ++i) |
| 15 | { |
| 16 | if (num - i == 0) |
| 17 | h(); |
| 18 | sw += array[i].w; |
| 19 | sh += array[i].h; |
| 20 | } |
| 21 | return (sw) + (sh); |
| 22 | } |