1module m
2 integer t;
3 !$omp threadprivate(t)
4end
5
6subroutine f1
7  use m
8  implicit none
9  integer :: i
10  !$omp simd order(concurrent)  ! { dg-message "note: enclosing region" } */
11  do i = 1, 64
12    t = t + 1  ! { dg-error "threadprivate variable 't' used in a region with 'order\\(concurrent\\)' clause" } */
13  end do
14end
15
16subroutine f2
17  use m
18  implicit none
19  integer :: i
20  !$omp do simd order(concurrent) ! { dg-message "note: enclosing region" } */
21  do i = 1, 64
22    t = t + 1  ! { dg-error "threadprivate variable 't' used in a region with 'order\\(concurrent\\)' clause" } */
23  end do
24end
25
26subroutine f3
27  use m
28  implicit none
29  integer :: i
30  !$omp do order(concurrent)  ! { dg-message "note: enclosing region" } */
31  do i = 1, 64
32    t = t + 1  ! { dg-error "threadprivate variable 't' used in a region with 'order\\(concurrent\\)' clause" } */
33  end do
34end
35