Add compile command to each testcase
[gcc-vect-testsuite.git] / pr21591.c
blob425777738c2c62e229b208944c7ef0e38c957851
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
4 struct a
6 int length;
7 int a1[256];
8 };
10 struct a *malloc1(__SIZE_TYPE__) __attribute__((malloc));
11 void free(void*);
13 struct a *p, *q, *r;
15 void f(void)
17 struct a *a = malloc1(sizeof(struct a));
18 struct a *b = malloc1(sizeof(struct a));
19 struct a *c = malloc1(sizeof(struct a));
20 int i;
22 for (i = 0; i < 256; i++)
24 b->a1[i] = i;
25 c->a1[i] = i;
27 for (i = 0; i < 256; i++)
29 a->a1[i] = b->a1[i] + c->a1[i];
31 p = a;
32 q = b;
33 r = c;
36 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
37 /* { dg-final { cleanup-tree-dump "vect" } } */