OSDN Git Service

PR tree-optimization/40542
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / vect / vect-71.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 /* indirect access.  */
9
10 __attribute__ ((noinline))
11 int main1 ()
12 {
13   int i;
14   unsigned ia[N];
15   unsigned ib[N+1] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2};
16
17   for (i = 2; i < N+1; i++)
18     {
19       ia[ib[i]] = 0;
20     }
21
22   /* check results:  */
23   for (i = 2; i < N+1; i++)
24     {
25       if (ia[ib[i]] != 0)
26         abort();
27     }
28
29   return 0;
30 }
31
32 int main (void)
33 {
34   check_vect ();
35
36   return main1 ();
37 }
38
39 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  { xfail *-*-* } } } */
40 /* { dg-final { cleanup-tree-dump "vect" } } */