[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / call15.f90
blobe91a2ec28227527d104eb77b61f31c25a6643fea
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! C711 An assumed-type actual argument that corresponds to an assumed-rank
3 ! dummy argument shall be assumed-shape or assumed-rank.
4 subroutine s(arg1, arg2, arg3)
5 type(*), dimension(..) :: arg1 ! assumed rank
6 type(*), dimension(:) :: arg2 ! assumed shape
7 type(*) :: arg3
9 call inner(arg1) ! OK, assumed rank
10 call inner(arg2) ! OK, assumed shape
11 !ERROR: Assumed-type 'arg3' must be either assumed shape or assumed rank to be associated with assumed rank dummy argument 'dummy='
12 call inner(arg3)
14 contains
15 subroutine inner(dummy)
16 type(*), dimension(..) :: dummy
17 end subroutine inner
18 end subroutine s