aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/num-teams-2.c
blob: 242b994da228c90094848d743500d3fe8b6781ab (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
25
26
27
int fn (int);

void
foo (int i)
{
  #pragma omp teams num_teams (6 : 4)		/* { dg-warning "'num_teams' lower bound '6' bigger than upper bound '4'" } */
  ;
  #pragma omp teams num_teams (-7)		/* { dg-warning "'num_teams' value must be positive" } */
  ;
  #pragma omp teams num_teams (i : -7)		/* { dg-warning "'num_teams' value must be positive" } */
  ;
  #pragma omp teams num_teams (-7 : 8)		/* { dg-warning "'num_teams' value must be positive" } */
  ;
}

void
bar (int i)
{
  #pragma omp target teams num_teams (6 : 4)	/* { dg-warning "'num_teams' lower bound '6' bigger than upper bound '4'" } */
  ;
  #pragma omp target teams num_teams (-7)	/* { dg-warning "'num_teams' value must be positive" } */
  ;
  #pragma omp target teams num_teams (i : -7)	/* { dg-warning "'num_teams' value must be positive" } */
  ;
  #pragma omp target teams num_teams (-7 : 8)	/* { dg-warning "'num_teams' value must be positive" } */
  ;
}