xref: /llvm-project/flang/test/Semantics/critical05.f90 (revision d0abde03543629f998b1a00f1c48b73bd459956f)
1*d0abde03SElliot Whitney! RUN: %python %S/test_errors.py %s %flang_fc1
2*d0abde03SElliot Whitneyprogram testcriticalconstruct
3*d0abde03SElliot Whitney  integer :: status
4*d0abde03SElliot Whitney  character(len=128) :: errormessage
5*d0abde03SElliot Whitney  integer :: total = 0
6*d0abde03SElliot Whitney  integer :: i
7*d0abde03SElliot Whitney
8*d0abde03SElliot Whitney  CRITICAL
9*d0abde03SElliot Whitney  END CRITICAL
10*d0abde03SElliot Whitney
11*d0abde03SElliot Whitney  Testname: Critical
12*d0abde03SElliot Whitney  End critical Testname
13*d0abde03SElliot Whitney
14*d0abde03SElliot Whitney  stat_variable: critical (STAT=status)
15*d0abde03SElliot Whitney  End critical stat_variable
16*d0abde03SElliot Whitney
17*d0abde03SElliot Whitney  errmsg_variable: critical (ERRMSG=errormessage)
18*d0abde03SElliot Whitney  End critical errmsg_variable
19*d0abde03SElliot Whitney
20*d0abde03SElliot Whitney  critical (ERRMSG=errormessage, STAT=status)
21*d0abde03SElliot Whitney  End critical
22*d0abde03SElliot Whitney
23*d0abde03SElliot Whitney  critical ()
24*d0abde03SElliot Whitney  end critical
25*d0abde03SElliot Whitney
26*d0abde03SElliot Whitney  critical (STAT=status)
27*d0abde03SElliot Whitney    do i = 1, this_image()
28*d0abde03SElliot Whitney        total = total + 1
29*d0abde03SElliot Whitney    end do
30*d0abde03SElliot Whitney    print *, "Total is: ", total
31*d0abde03SElliot Whitney  End critical
32*d0abde03SElliot Whitney
33*d0abde03SElliot Whitney  critical
34*d0abde03SElliot Whitney    10 continue
35*d0abde03SElliot Whitney    GO TO 10
36*d0abde03SElliot Whitney  End critical
37*d0abde03SElliot Whitney
38*d0abde03SElliot Whitneyend program testcriticalconstruct
39