* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-66.c
blob683cd7378cd20180a4ef3e62bac0a480abd5141b
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 int main1 ()
10 int i, j;
11 int ib[6] = {0,3,6,9,12,15};
12 int ia[8][5][6];
13 int ic[16][16][5][6];
15 /* Multidimensional array. Aligned. */
16 for (i = 0; i < 16; i++)
18 for (j = 0; j < 4; j++)
20 ia[2][6][j] = 5;
24 /* check results: */
25 for (i = 0; i < 16; i++)
27 for (j = 0; j < 4; j++)
29 if (ia[2][6][j] != 5)
30 abort();
33 /* Multidimensional array. Aligned. */
34 for (i = 0; i < 16; i++)
36 for (j = 0; j < 4; j++)
37 ia[3][6][j+2] = 5;
40 /* check results: */
41 for (i = 0; i < 16; i++)
43 for (j = 2; j < 6; j++)
45 if (ia[3][6][j] != 5)
46 abort();
50 /* Multidimensional array. Not aligned. */
51 for (i = 0; i < 16; i++)
53 for (j = 0; j < 4; j++)
55 ic[2][1][6][j+1] = 5;
59 /* check results: */
60 for (i = 0; i < 16; i++)
62 for (j = 0; j < 4; j++)
64 if (ic[2][1][6][j+1] != 5)
65 abort();
69 return 0;
72 int main (void)
74 check_vect ();
76 return main1 ();
79 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
80 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
81 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */
82 /* { dg-final { cleanup-tree-dump "vect" } } */