summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/autopar/pr39500-2.c
blob: eabac3f88c6abcd9afcca5ed03f0d5af28d5c9df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* pr39500: autopar fails to parallel */
/* origin: nemokingdom@gmail.com(LiFeng) */
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details" } */

int main (void)
{
  int i;
  int x[1000];

  for (i = 0; i < 101; i++)
    x[i] = x[i+100];

  return x[12];
}

/* This loop cannot be parallelized due to a dependence.  */

/* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 0 "parloops" } } */
/* { dg-final { cleanup-tree-dump "parloops" } } */