Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / call13.f90
bloba5ef1ca34a66d16df24203af308ed055ec3e85ca
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test 15.4.2.2 constraints and restrictions for calls to implicit
3 ! interfaces
5 subroutine s(assumedRank, coarray, class, classStar, typeStar)
6 type :: t
7 end type
9 real :: assumedRank(..), coarray[*]
10 class(t) :: class
11 class(*) :: classStar
12 type(*) :: typeStar
14 type :: pdt(len)
15 integer, len :: len
16 end type
17 type(pdt(1)) :: pdtx
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
36 if (typeStar) then
37 endif
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
42 end subroutine