fortran/trans-openmp.cc: Use the correct member in gfc_omp_namelist [PR118745]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-98-big-array.c
blobb97a20701e266ce948a181f21533edc28df7e2bb
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
8 #define DOT16( a, b) ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + \
9 a[4]*b[4] + a[5]*b[5] + a[6]*b[6] + a[7]*b[7] + \
10 a[8]*b[8] + a[9]*b[9] + a[10]*b[10] + a[11]*b[11] + \
11 a[12]*b[12] + a[13]*b[13] + a[14]*b[14] + a[15]*b[15])
13 __attribute__ ((noinline))
14 int main1 (int ia[][N])
16 int i, j;
17 int ib[N] = {0,3,6,9};
18 int ic[N][N];
20 for (i = 0; i < N; i++)
22 ic[0][i] = DOT16 (ia[i], ib);
25 /* check results: */
26 #pragma GCC novector
27 for (i = 0; i < N; i++)
29 if (ic[0][i] != DOT16 (ia[i], ib))
30 abort ();
33 return 0;
36 int main (void)
38 int ia[N][N];
39 int i,j;
40 for (i = 0; i < N; i++)
41 for (j = 0; j < N; j++)
43 ia[i][j] = i + j + 1;
44 asm volatile ("" ::: "memory");
47 check_vect ();
49 return main1 (ia);
52 /* Needs interleaving support. */
53 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided4 } } } */
54 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { xfail vect_strided4 } } } */
55 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */