gcc/testsuite/gcc.dg/vect/no-tree-dom-vect-bug.c
raw| 1 | /* { dg-require-effective-target vect_int } */ |
| 2 | |
| 3 | #include <stdarg.h> |
| 4 | #include "tree-vect.h" |
| 5 | |
| 6 | long stack_vars_sorted[32]; |
| 7 | |
| 8 | __attribute__ ((noinline)) int |
| 9 | main1 (long n) |
| 10 | { |
| 11 | long si; |
| 12 | |
| 13 | for (si = 0; si < n; ++si) |
| 14 | stack_vars_sorted[si] = si; |
| 15 | } |
| 16 | |
| 17 | int main () |
| 18 | { |
| 19 | long si; |
| 20 | |
| 21 | check_vect (); |
| 22 | main1 (32); |
| 23 | |
| 24 | #pragma GCC novector |
| 25 | for (si = 0; si < 32; ++si) |
| 26 | if (stack_vars_sorted[si] != si) |
| 27 | abort (); |
| 28 | |
| 29 | return 0; |
| 30 | } |