libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-36.c
blobd1743100aaa1d0fa5666ee4abd11f7c908616cc0
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 #define N 16
9 __attribute__ ((noinline))
10 int main1 ()
12 int i;
13 struct {
14 char ca[N];
15 char cb[N];
16 } s;
19 for (i = 0; i < N; i++)
21 s.cb[i] = 3*i;
22 __asm__ volatile ("");
25 for (i = 0; i < N; i++)
27 s.ca[i] = s.cb[i];
30 /* check results: */
31 #pragma GCC novector
32 for (i = 0; i < N; i++)
34 if (s.ca[i] != s.cb[i])
35 abort ();
38 return 0;
41 int main (void)
43 check_vect ();
45 return main1 ();
48 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
49 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */