gcc/testsuite/gcc.dg/vect/vect-early-break_119-pr114068.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-add-options vect_early_break } */ |
| 3 | /* { dg-require-effective-target vect_early_break } */ |
| 4 | /* { dg-require-effective-target vect_int } */ |
| 5 | /* { dg-additional-options "-O3" } */ |
| 6 | |
| 7 | struct h { |
| 8 | int b; |
| 9 | int c; |
| 10 | int f; |
| 11 | } k; |
| 12 | |
| 13 | void n(int m) { |
| 14 | struct h a = k; |
| 15 | for (int o = m; o; ++o) { |
| 16 | if (a.f) |
| 17 | __builtin_unreachable(); |
| 18 | if (o > 1) |
| 19 | __builtin_unreachable(); |
| 20 | *(&k.b + o) = 1; |
| 21 | *(&k.c + o*m) = 2; |
| 22 | } |
| 23 | } |