OSDN Git Service

2007-12-06 Zdenek Dvorak <ook@ucw.cz>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / vect-iv-10.c
1 /* { dg-require-effective-target vect_int } */
2
3 #include <stdarg.h>
4 #include "tree-vect.h"
5
6 #define N 16
7
8 int main1 ()
9 {
10   int i,j;
11   int ia[N];
12
13   /* Induction.  */
14   for (j=0,i=N;  j<N,i>0;  i--,j++) {
15     ia[j] = i;
16   }
17
18   /* check results:  */
19   for (j=0,i=N;  j<N,i>0;  i--,j++) {
20       if (ia[j] != i)
21         abort ();
22     }
23
24   return 0;
25 }
26
27 int main (void)
28
29   check_vect();
30   
31   return main1 ();
32 }
33
34 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
35 /* { dg-final { cleanup-tree-dump "vect" } } */