PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-33.c
blobe215052ff777a911358e1291630df9cabd27e343
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 16
8 struct test {
9 char ca[N];
12 extern struct test s;
14 __attribute__ ((noinline))
15 int main1 ()
17 int i;
19 for (i = 0; i < N; i++)
21 s.ca[i] = 5;
24 /* check results: */
25 for (i = 0; i < N; i++)
27 if (s.ca[i] != 5)
28 abort ();
31 return 0;
34 int main (void)
36 return main1 ();
39 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
40 /* { dg-final { scan-tree-dump "Vectorizing an unaligned access" "vect" { target { { { ! powerpc*-*-* } && vect_hw_misalign } && { { ! vect64 } || vect_multiple_sizes } } xfail { ! vect_unaligned_possible } } } } */
41 /* { dg-final { scan-tree-dump "Alignment of access forced using peeling" "vect" { target { vector_alignment_reachable && { vect64 && {! vect_multiple_sizes} } } } } } */
42 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { { {! vector_alignment_reachable} || {! vect64} } && {! vect_hw_misalign} } } } } */