aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr53580.c
blob: 941a90d22408fee6dbe0be064154fcb34ca9efdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR middle-end/53580 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */

int
main ()
{
  int x, y, v = 0;

#pragma omp parallel
  #pragma omp for
    for (x = 0; x < 10; x++)
      {
      #pragma omp for reduction(+: v)	/* { dg-error "work-sharing region may not be closely nested inside of work-sharing" } */
	for (y = 0; y < 10; y++)
	  v++;
      }
  return v - 100;
}