1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test 15.4.2.2 constraints and restrictions for calls to implicit
5 subroutine s(assumedRank
, coarray
, class
, classStar
, typeStar
)
9 real :: assumedRank(..), coarray
[*]
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 interface
22 call implicit10(1, 2, keyword
=3) ! 15.4.2.2(1)
23 !ERROR: Assumed rank argument requires an explicit interface
24 call implicit11(assumedRank
) ! 15.4.2.2(3)(c)
25 !ERROR: Coarray argument requires an explicit interface
26 call implicit12(coarray
) ! 15.4.2.2(3)(d)
27 !ERROR: Parameterized derived type argument requires an explicit interface
28 call implicit13(pdtx
) ! 15.4.2.2(3)(e)
29 !ERROR: Polymorphic argument requires an explicit interface
30 call implicit14(class
) ! 15.4.2.2(3)(f)
31 !ERROR: Polymorphic argument requires an explicit interface
32 call implicit15(classStar
) ! 15.4.2.2(3)(f)
33 !ERROR: Assumed type argument requires an explicit interface
34 call implicit16(typeStar
) ! 15.4.2.2(3)(f)
35 !ERROR: TYPE(*) dummy argument may only be used as an actual argument
38 !ERROR: TYPE(*) dummy argument may only be used as an actual argument
39 classStar
= typeStar
! C710
40 !ERROR: TYPE(*) dummy argument may only be used as an actual argument
41 typeStar
= classStar
! C710