summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/gomp/clause-4.C
blob: 06b91e8a28d3973a7d2b45eae7d96c28f73a30b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR c/34506
// { dg-do compile }

#define p parallel

void
foo (int x)
{
#pragma omp p num_threads (4) if (1) private (x)
    ;
#pragma omp p num_threads(4)if(1)private(x)
    ;
#pragma omp p num_threads (4), if (1) , private (x)
    ;
#pragma omp p num_threads(4),if(1),private(x)
    ;
#pragma omp p, num_threads (4), if (1), private (x)	// { dg-error "clause before" }
    ;
#pragma omp p num_threads (4), if (1), private (x),	// { dg-error "clause before" }
    ;
#pragma omp p num_threads (4), , if (1), private (x)	// { dg-error "clause before" }
    ;
}