aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.fortran/strictly-structured-block-1.f90
blob: 8e7f6c8b9d30cb26b212986d8ad3cc400f639afb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
subroutine one
  implicit none (external, type)
  integer :: i, j
  i = 5
  j = 6
  !$omp parallel
  my_block : block
    !$omp atomic write
    i = 7
    exit my_block

    !$omp atomic write
    j = 99  ! Should be unreachable

    ! exit should jump here - end of block but inside of it.
  end block my_block
  if (i /= 7) stop 1
  if (j /= 6) stop 2
end

 call one
end