Merged with mainline at revision 128810.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-72.c
blob3d678a8c58c8174cdaa766ff353ee60bfe29f0a6
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
8 /* unaligned load. */
10 __attribute__ ((noinline))
11 int main1 ()
13 int i;
14 char ia[N];
15 char ib[N+1];
17 for (i=0; i < N+1; i++)
19 ib[i] = i;
22 for (i = 1; i < N+1; i++)
24 ia[i-1] = ib[i];
27 /* check results: */
28 for (i = 1; i <= N; i++)
30 if (ia[i-1] != ib[i])
31 abort ();
34 return 0;
37 int main (void)
39 check_vect ();
41 return main1 ();
44 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
45 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail vect_no_align } } } */
46 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
47 /* { dg-final { cleanup-tree-dump "vect" } } */