brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 90e1918 Raw
43 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! Test 15.4.2.2 constraints and restrictions for calls to implicit3! interfaces4 5subroutine s(assumedRank, coarray, class, classStar, typeStar)6  type :: t7  end type8 9  real :: assumedRank(..), coarray[*]10  class(t) :: class11  class(*) :: classStar12  type(*) :: typeStar13 14  type :: pdt(len)15    integer, len :: len16  end type17  type(pdt(1)) :: pdtx18 19  !ERROR: Invalid specification expression: reference to impure function 'implicit01'20  real :: array(implicit01())  ! 15.4.2.2(2)21  !ERROR: Keyword 'keyword=' may not appear in a reference to a procedure with an implicit interface22  call implicit10(1, 2, keyword=3)  ! 15.4.2.2(1)23  !ERROR: Assumed rank argument 'assumedrank' requires an explicit interface24  call implicit11(assumedRank)  ! 15.4.2.2(3)(c)25  call implicit12(coarray)  ! ok26  call implicit12a(coarray[1]) ! ok27  !ERROR: Parameterized derived type actual argument requires an explicit interface28  call implicit13(pdtx)  ! 15.4.2.2(3)(e)29  call implicit14(class)  ! ok30  !ERROR: Unlimited polymorphic actual argument requires an explicit interface31  call implicit15(classStar)  ! 15.4.2.2(3)(f)32  !ERROR: Assumed type actual argument requires an explicit interface33  call implicit16(typeStar)  ! 15.4.2.2(3)(f)34  !ERROR: TYPE(*) dummy argument may only be used as an actual argument35  if (typeStar) then36  endif37  !ERROR: TYPE(*) dummy argument may only be used as an actual argument38  classStar = typeStar  ! C71039  !ERROR: TYPE(*) dummy argument may only be used as an actual argument40  typeStar = classStar  ! C71041end subroutine42 43