libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-scevccp-outer-11.c
blobd650a9d1cdc7af778a2dac8e3e251527b825487d
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 40
8 int a[N];
10 __attribute__ ((noinline)) int
11 foo (int n){
12 int i,j;
13 int sum;
15 for (i = 0; i < n; i++) {
16 sum = 0;
17 for (j = 0; j < N; j++) {
18 sum += j;
20 a[i] = sum;
24 int main (void)
26 int i,j;
27 int sum;
29 check_vect ();
31 for (i=0; i<N; i++)
32 a[i] = i;
34 foo (N);
36 /* check results: */
37 #pragma GCC novector
38 for (i=0; i<N; i++)
40 sum = 0;
41 for (j = 0; j < N; j++)
42 sum += j;
43 if (a[i] != sum)
44 abort();
47 return 0;
50 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" } } */