Add compile command to each testcase
[gcc-vect-testsuite.git] / vect-35.c
blob0f4284a6257d564628b564713c35c8cea36afa32
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
8 __attribute__ ((noinline))
9 int main1 ()
11 union {
12 unsigned char a[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
13 unsigned char b[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
14 } s;
15 int i;
17 /* Initialization. */
18 for (i = 0; i < N; i++)
20 s.b[i] = i;
23 /* Dependence analysis fails cause s.a and s.b may overlap.
24 Use runtime aliasing test with versioning. */
25 for (i = 0; i < N; i++)
27 s.a[i] = s.b[i] + 1;
30 /* check results: */
31 for (i = 0; i < N; i++)
33 if (s.a[i] != i + 1)
34 abort ();
37 return 0;
40 int main (void)
42 check_vect ();
44 return main1 ();
48 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { ia64-*-* sparc*-*-* } } } } */
49 /* { dg-final { scan-tree-dump-times "can't determine dependence between" 1 "vect" } } */
50 /* { dg-final { cleanup-tree-dump "vect" } } */