1! RUN: %S/test_errors.sh %s %t %flang_fc1
2! REQUIRES: shell
3!C1119
4
5subroutine test1(a, i)
6  integer i
7  real a(10)
8  critical
9    if (a(i) < 0.0) then
10      a(i) = 20.20
11      !ERROR: Control flow escapes from CRITICAL
12      goto 20
13    end if
14  end critical
1520 a(i) = -a(i)
16end subroutine test1
17
18subroutine test2(i)
19  integer i
20  critical
21    !ERROR: Control flow escapes from CRITICAL
22    if (i) 10, 10, 20
23    10 i = i + 1
24  end critical
2520 i = i - 1
26end subroutine test2
27
28subroutine test3(i)
29  integer i
30  critical
31    !ERROR: Control flow escapes from CRITICAL
32    goto (10, 10, 20) i
33    10 i = i + 1
34  end critical
3520 i = i - 1
36end subroutine test3
37