Add compile command to each testcase
[gcc-vect-testsuite.git] / no-vfa-vect-101.c
blob1830eb8aa27e65e15b211c8528137b10835e4091
1 /* { dg-require-effective-target vect_int } */
3 #include <stdlib.h>
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 9
9 struct extraction
11 int a[N];
12 int b[N];
15 static int a[N] = {1,2,3,4,5,6,7,8,9};
16 static int b[N] = {2,3,4,5,6,7,8,9,0};
18 __attribute__ ((noinline))
19 int main1 (int x, int y) {
20 int i;
21 struct extraction *p;
22 p = (struct extraction *) malloc (sizeof (struct extraction));
24 /* Not vectorizable: different unknown offset. */
25 for (i = 0; i < N; i++)
27 *((int *)p + x + i) = a[i];
28 *((int *)p + y + i) = b[i];
31 /* check results: */
32 for (i = 0; i < N; i++)
34 if (p->a[i] != a[i] || p->b[i] != b[i])
35 abort();
37 return 0;
40 int main (void)
42 check_vect ();
44 return main1 (0, N);
47 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" } } */
48 /* { dg-final { scan-tree-dump-times "can't determine dependence" 1 "vect" } } */
49 /* { dg-final { cleanup-tree-dump "vect" } } */