libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-33.c
blob7a373391002fe127a6dd43f36bb5f63cfc8f3e44
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
5 #include <stdarg.h>
6 #include "tree-vect.h"
8 #define N 16
9 struct test {
10 char ca[N];
13 extern struct test s;
15 __attribute__ ((noinline))
16 int main1 ()
18 int i;
20 for (i = 0; i < N; i++)
22 s.ca[i] = 5;
25 /* check results: */
26 #pragma GCC novector
27 for (i = 0; i < N; i++)
29 if (s.ca[i] != 5)
30 abort ();
33 return 0;
36 int main (void)
38 return main1 ();
41 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
42 /* { dg-final { scan-tree-dump "Vectorizing an unaligned access" "vect" { target { { { ! powerpc*-*-* } && vect_hw_misalign } && { { ! vect64 } || vect_multiple_sizes } } xfail { ! vect_unaligned_possible } } } } */
43 /* { dg-final { scan-tree-dump "Alignment of access forced using peeling" "vect" { target { vector_alignment_reachable && { vect64 && {! vect_multiple_sizes} } } } } } */
44 /* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { { {! vector_alignment_reachable} || {! vect64} } && {! vect_hw_misalign} } } } } */
45 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */