libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / no-section-anchors-vect-outer-4h.c
blobf79b74d15700ccd86fc268e039efc8d7b8d245c2
1 /* { dg-require-effective-target vect_int } */
2 #include <stdarg.h>
3 #include "tree-vect.h"
6 #define N 40
7 #define M 128
8 unsigned short a[M][N];
9 unsigned int out[N];
11 /* Outer-loop vectorization. */
13 __attribute__ ((noinline))
14 void
15 foo (){
16 int i,j;
17 unsigned int diff;
19 for (i = 0; i < N; i++) {
20 for (j = 0; j < M; j++) {
21 a[j][i] = 4;
23 out[i]=5;
27 int main (void)
29 int i, j;
30 check_vect ();
32 foo ();
34 #pragma GCC novector
35 for (i = 0; i < N; i++) {
36 #pragma GCC novector
37 for (j = 0; j < M; j++) {
38 if (a[j][i] != 4)
39 abort ();
41 if (out[i] != 5)
42 abort ();
45 return 0;
49 /* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */