openmp: Fix signed/unsigned warning
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-iv-1.c
blobe6dcf29ebe0d2b2dc6695e754c4a1043f743dd58
1 /* { dg-require-effective-target vect_int } */
3 #include <stdarg.h>
4 #include "tree-vect.h"
6 #define N 16
7 int result[N] = {8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38};
9 __attribute__ ((noinline)) int main1 (int X)
11 int arr[N];
12 int k = X;
13 int m, i=0;
15 /* vectorization of induction. */
17 do {
18 m = k + 5;
19 arr[i] = m;
20 k = k + 2;
21 i++;
22 } while (i < N);
24 /* check results: */
25 #pragma GCC novector
26 for (i = 0; i < N; i++)
28 if (arr[i] != result[i])
29 abort ();
32 return 0;
35 int main (void)
37 check_vect ();
39 return main1 (3);
42 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */