[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / call13.f90
blob47786fa9f9cd6b1712ce5f2744e29f63449c8f7e
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! Test 15.4.2.2 constraints and restrictions for calls to implicit
4 ! interfaces
6 subroutine s(assumedRank, coarray, class, classStar, typeStar)
7 type :: t
8 end type
10 real :: assumedRank(..), coarray[*]
11 class(t) :: class
12 class(*) :: classStar
13 type(*) :: typeStar
15 type :: pdt(len)
16 integer, len :: len
17 end type
18 type(pdt(1)) :: pdtx
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
37 if (typeStar) then
38 endif
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
43 end subroutine