1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! Test 15.4.2.2 constraints and restrictions for calls to implicit
6 subroutine s(assumedRank
, coarray
, class
, classStar
, typeStar
)
10 real :: assumedRank(..), coarray
[*]
20 !ERROR: Invalid specification expression: reference to impure function 'implicit01'
21 real :: array(implicit01()) ! 15.4.2.2(2)
22 !ERROR: Keyword 'keyword=' may not appear in a reference to a procedure with an implicit interface
23 call implicit10(1, 2, keyword
=3) ! 15.4.2.2(1)
24 !ERROR: Assumed rank argument requires an explicit interface
25 call implicit11(assumedRank
) ! 15.4.2.2(3)(c)
26 !ERROR: Coarray argument requires an explicit interface
27 call implicit12(coarray
) ! 15.4.2.2(3)(d)
28 !ERROR: Parameterized derived type argument requires an explicit interface
29 call implicit13(pdtx
) ! 15.4.2.2(3)(e)
30 !ERROR: Polymorphic argument requires an explicit interface
31 call implicit14(class
) ! 15.4.2.2(3)(f)
32 !ERROR: Polymorphic argument requires an explicit interface
33 call implicit15(classStar
) ! 15.4.2.2(3)(f)
34 !ERROR: Assumed type argument requires an explicit interface
35 call implicit16(typeStar
) ! 15.4.2.2(3)(f)
36 !ERROR: TYPE(*) dummy argument may only be used as an actual argument
39 !ERROR: TYPE(*) dummy argument may only be used as an actual argument
40 classStar
= typeStar
! C710
41 !ERROR: TYPE(*) dummy argument may only be used as an actual argument
42 typeStar
= classStar
! C710