summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/combined-1.c
blob: dfed647371f5ba39e84ed6857734ef1609f8add4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* { dg-do compile } */
/* { dg-options "-O1 -fopenmp -fdump-tree-optimized" } */

int a[10];
int foo (void)
{
    int i;
#pragma omp parallel for schedule(runtime)
    for (i = 0; i < 10; i++)
      a[i] = i;
#pragma omp parallel
#pragma omp for schedule(runtime)
    for (i = 0; i < 10; i++)
      a[i] = 10 - i;
#pragma omp parallel
      {
#pragma omp for schedule(runtime)
	for (i = 0; i < 10; i++)
	  a[i] = i;
      }
}

/* { dg-final { scan-tree-dump-times "GOMP_parallel_loop_runtime_start" 3 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */