2017-12-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-2.c
blobd975668cbd023b0324c7526e162bc1aeb21dfcd7
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-add-options bind_pic_locally } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 16
9 char cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
10 char ca[N] = {};
12 __attribute__ ((noinline))
13 int main1 ()
15 int i;
17 for (i = 0; i < N; i++)
19 ca[i] = cb[i];
22 /* check results: */
23 for (i = 0; i < N; i++)
25 if (ca[i] != cb[i])
26 abort ();
29 return 0;
32 int main (void)
34 check_vect ();
36 return main1 ();
39 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
40 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */