cfgexpand: Expand comment on when non-var clobbers can show up
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-early-break-template_2.c
blobdce852e760a24355baa6c1c50040554709e7ef4b
1 #include "tree-vect.h"
3 #ifndef N
4 #define N 803
5 #endif
7 #ifndef P
8 #define P 0
9 #endif
11 unsigned vect_a[N] = {0};
12 unsigned vect_b[N] = {0};
14 __attribute__((noipa, noinline))
15 unsigned test4(unsigned x)
17 unsigned ret = 0;
18 for (int i = 0; i < N; i++)
20 vect_b[i] = x + i;
21 if (vect_a[i] > x)
22 return i;
23 vect_a[i] = x;
26 return ret;
29 extern void abort ();
31 int main ()
33 check_vect ();
35 int x = 1;
36 int idx = P;
37 vect_a[idx] = x + 1;
39 unsigned res = test4(x);
41 if (res != idx)
42 abort ();
44 if (vect_b[idx] != (x + idx))
45 abort ();
47 if (vect_a[idx] != x + 1)
48 abort ();
50 if (idx > 0 && vect_a[idx-1] != x)
51 abort ();