libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-71.c
blob561cb62db2e93624ff12dbc27cf0463aec8f947d
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 16
9 /* indirect access. */
11 __attribute__ ((noinline))
12 int main1 ()
14 int i;
15 unsigned ia[N];
16 unsigned ib[N+1] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2};
18 for (i = 2; i < N+1; i++)
20 ia[ib[i]] = 0;
23 /* check results: */
24 #pragma GCC novector
25 for (i = 2; i < N+1; i++)
27 if (ia[ib[i]] != 0)
28 abort();
31 return 0;
34 int main (void)
36 check_vect ();
38 return main1 ();
41 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
42 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */