libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-112.c
blob6b18299c06bad02e476608bce999300ee59e4cae
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 char cb[N] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17};
10 char cc[N] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};
12 __attribute__ ((noinline)) int
13 main1 (void)
15 int i;
16 int diff = 0;
18 /* Cross-iteration cycle. */
19 diff = 0;
20 for (i = 0; i < N; i++) {
21 diff += (cb[i] - cc[i]);
24 /* Check results. */
25 if (diff != 16)
26 abort();
28 return 0;
31 int main (void)
33 check_vect ();
34 return main1 ();
37 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_unpack } } } */
40 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */