PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-section-anchors-vect-36.c
blob7663ca7281aacc0ba3e685887e3c20be97322148
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-add-options bind_pic_locally } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #if VECTOR_BITS > 128
8 #define N (VECTOR_BITS * 2 / 8)
9 #else
10 #define N 32
11 #endif
13 struct {
14 char ca[N];
15 char cb[N];
16 } s;
18 __attribute__ ((noinline))
19 int main1 ()
21 int i;
23 for (i = 0; i < N; i++)
25 s.cb[i] = 3*i;
26 __asm__ volatile ("");
29 for (i = 0; i < N; i++)
31 s.ca[i] = s.cb[i];
34 /* check results: */
35 for (i = 0; i < N; i++)
37 if (s.ca[i] != s.cb[i])
38 abort ();
41 return 0;
44 int main (void)
46 check_vect ();
48 return main1 ();
51 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
52 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
53 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */