1! { dg-do compile }
2
3      SUBROUTINE WRONG4(N)
4      INTEGER N
5        INTEGER I
6!$OMP PARALLEL DEFAULT(SHARED)
7!$OMP DO
8          DO I = 1, N
9             CALL WORK(I, 1)
10! incorrect nesting of barrier region in a loop region
11!$OMP BARRIER	! { dg-error "may not be closely nested" }
12             CALL WORK(I, 2)
13          END DO
14!$OMP END PARALLEL
15      END SUBROUTINE WRONG4
16