LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-98-big-array.c
blob61b749d4669386a890f5c2f5ba83d6e00d269b4f
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
7 #define DOT16( a, b) ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + \
8 a[4]*b[4] + a[5]*b[5] + a[6]*b[6] + a[7]*b[7] + \
9 a[8]*b[8] + a[9]*b[9] + a[10]*b[10] + a[11]*b[11] + \
10 a[12]*b[12] + a[13]*b[13] + a[14]*b[14] + a[15]*b[15])
12 __attribute__ ((noinline))
13 int main1 (int ia[][N])
15 int i, j;
16 int ib[N] = {0,3,6,9};
17 int ic[N][N];
19 for (i = 0; i < N; i++)
21 ic[0][i] = DOT16 (ia[i], ib);
24 /* check results: */
25 for (i = 0; i < N; i++)
27 if (ic[0][i] != DOT16 (ia[i], ib))
28 abort ();
31 return 0;
34 int main (void)
36 int ia[N][N];
37 int i,j;
38 for (i = 0; i < N; i++)
39 for (j = 0; j < N; j++)
41 ia[i][j] = i + j + 1;
42 asm volatile ("" ::: "memory");
45 check_vect ();
47 return main1 (ia);
50 /* Needs interleaving support. */
51 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_strided4 } } } */
52 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { xfail vect_strided4 } } } */