libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-99.c
blobf6ac00adff844a5c4a550f4f9aa5b0770edb7530
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
4 #include "tree-vect.h"
6 int ca[100];
8 __attribute__ ((noinline))
9 void foo (int n)
11 unsigned int i;
13 for (i = 0; i < n; i++)
14 ca[i] = 2;
17 int main (void)
19 int i;
21 check_vect ();
23 foo(100);
25 #pragma GCC novector
26 for (i = 0; i < 100; ++i) {
27 if (ca[i] != 2)
28 abort();
30 return 0;
33 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
34 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */