Merge from mainline (gomp-merge-2005-02-26).
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-28.c
blob42118d4ea9cfbcc7dea4f42aa6a3fd925e3a2dc4
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 128
7 #define OFF 3
9 /* unaligned store. */
11 int main1 (int off)
13 int i;
14 int ia[N+OFF];
16 for (i = 0; i < N; i++)
18 ia[i+off] = 5;
21 /* check results: */
22 for (i = 0; i < N; i++)
24 if (ia[i+off] != 5)
25 abort ();
28 return 0;
31 int main (void)
33 check_vect ();
35 main1 (0); /* aligned */
36 main1 (OFF); /* unaligned */
37 return 0;
40 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
41 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
42 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" } } */