aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/gomp/order-4.c
blob: d1109bb13b3b7bac88df9f835ed0add9b556e198 (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
28
29
int t;
#pragma omp threadprivate(t)

void
f1 (void)
{
  int i;
  #pragma omp simd order(concurrent)	/* { dg-message "note: enclosing region" } */
  for (i = 0; i < 64; i++)
    t++;	/* { dg-error "threadprivate variable 't' used in a region with 'order\\(concurrent\\)' clause" } */
}

void
f2 (void)
{
  int i;
  #pragma omp for simd order(concurrent)	/* { dg-message "note: enclosing region" } */
  for (i = 0; i < 64; i++)			/* { dg-message "note: enclosing region" "" { target c++ } } */
    t++;	/* { dg-error "threadprivate variable 't' used in a region with 'order\\(concurrent\\)' clause" } */
}

void
f3 (void)
{
  int i;
  #pragma omp for order(concurrent)	/* { dg-message "note: enclosing region" } */
  for (i = 0; i < 64; i++)
    t++;	/* { dg-error "threadprivate variable 't' used in a region with 'order\\(concurrent\\)' clause" } */
}