123 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12!C11183 4subroutine test15 critical6 !ERROR: RETURN statement is not allowed in a CRITICAL construct7 return8 end critical9end subroutine test110 11subroutine test2()12 implicit none13 critical14 !ERROR: An image control statement is not allowed in a CRITICAL construct15 SYNC ALL16 end critical17end subroutine test218 19subroutine test3()20 use iso_fortran_env, only: team_type21 implicit none22 type(team_type) :: j23 critical24 !ERROR: An image control statement is not allowed in a CRITICAL construct25 sync team (j)26 end critical27end subroutine test328 29subroutine test4()30 integer, allocatable, codimension[:] :: ca31 32 critical33 !ERROR: An image control statement is not allowed in a CRITICAL construct34 allocate(ca[*])35 end critical36 37 critical38 !ERROR: An image control statement is not allowed in a CRITICAL construct39 deallocate(ca)40 end critical41end subroutine test442 43subroutine test5()44 use iso_fortran_env, only: team_type45 implicit none46 type(team_type) :: j47 critical48 change team (j)49 !ERROR: An image control statement is not allowed in a CRITICAL construct50 end team51 end critical52end subroutine test553 54subroutine test655 critical56 critical57 !ERROR: An image control statement is not allowed in a CRITICAL construct58 end critical59 end critical60end subroutine test661 62subroutine test7()63 use iso_fortran_env64 type(event_type), save :: x[*], y[*]65 critical66 !ERROR: An image control statement is not allowed in a CRITICAL construct67 event post (x)68 !ERROR: An image control statement is not allowed in a CRITICAL construct69 event wait (y)70 end critical71end subroutine test772 73subroutine test8()74 use iso_fortran_env75 type(team_type) :: t76 77 critical78 !ERROR: An image control statement is not allowed in a CRITICAL construct79 form team(1, t)80 end critical81end subroutine test882 83subroutine test9()84 use iso_fortran_env85 type(lock_type), save :: l[*]86 87 critical88 !ERROR: An image control statement is not allowed in a CRITICAL construct89 lock(l)90 !ERROR: An image control statement is not allowed in a CRITICAL construct91 unlock(l)92 end critical93end subroutine test994 95subroutine test10()96 use iso_fortran_env97 integer, allocatable, codimension[:] :: ca98 allocate(ca[*])99 100 critical101 block102 integer, allocatable, codimension[:] :: cb103 cb = ca104 !TODO: Deallocation of this coarray is not currently caught105 end block106 end critical107end subroutine test10108 109subroutine test11()110 integer, allocatable, codimension[:] :: ca, cb111 critical112 !ERROR: An image control statement is not allowed in a CRITICAL construct113 call move_alloc(cb, ca)114 end critical115end subroutine test11116 117subroutine test12()118 critical119 !ERROR: An image control statement is not allowed in a CRITICAL construct120 stop121 end critical122end subroutine test12123