1 /* { dg-require-effective-target vect_int } */
2 /* { dg-add-options bind_pic_locally } */
3
4 #include <stdarg.h>
5 #include "tree-vect.h"
6
7 #define N 16
8
9 struct {
10 char ca[N];
11 } s = {};
12 char cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
13
14 __attribute__ ((noinline))
main1()15 int main1 ()
16 {
17 int i;
18
19 for (i = 0; i < N; i++)
20 {
21 s.ca[i] = cb[i];
22 }
23
24 /* check results: */
25 for (i = 0; i < N; i++)
26 {
27 if (s.ca[i] != cb[i])
28 abort ();
29 }
30
31 return 0;
32 }
33
main(void)34 int main (void)
35 {
36 check_vect ();
37
38 return main1 ();
39 }
40
41 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
42 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
43