PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-7.c
blobc4556e321c6b0d6bf1a2cd36136d71a43718af32
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 128
9 short sa[N];
10 short sb[N];
12 __attribute__ ((noinline))
13 int main1 ()
15 int i;
17 for (i = 0; i < N; i++)
19 sb[i] = 5;
22 /* check results: */
23 for (i = 0; i < N; i++)
25 if (sb[i] != 5)
26 abort ();
29 for (i = 0; i < N; i++)
31 sa[i] = sb[i] + 100;
34 /* check results: */
35 for (i = 0; i < N; i++)
37 if (sa[i] != 105)
38 abort ();
41 return 0;
44 int main (void)
46 check_vect ();
48 return main1 ();
51 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
52 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */