brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 6dcf20e Raw
33 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12 3module m4  type t15  end type6  type t27    class(t2), allocatable :: pc8  end type9  class(t1), pointer :: mp110  type(t2) :: mv111 contains12  pure subroutine subr(pp1, pp2, mp2)13    class(t1), intent(in out), pointer :: pp114    class(t2), intent(in out) :: pp215    type(t2), pointer :: mp216    !ERROR: Name in DEALLOCATE statement is not definable17    !BECAUSE: 'mp1' may not be defined in pure subprogram 'subr' because it is host-associated18    deallocate(mp1)19    !ERROR: Name in DEALLOCATE statement is not definable20    !BECAUSE: 'mv1' may not be defined in pure subprogram 'subr' because it is host-associated21    deallocate(mv1%pc)22    !ERROR: Name in DEALLOCATE statement is not definable23    !BECAUSE: 'pp1' is a whole polymorphic object in a pure subprogram24    deallocate(pp1)25    !ERROR: Name in DEALLOCATE statement is not definable26    !BECAUSE: 'pc' is a whole polymorphic object in a pure subprogram27    deallocate(pp2%pc)28    !ERROR: Object in DEALLOCATE statement is not deallocatable29    !BECAUSE: 'mp2' has polymorphic component '%pc' in a pure subprogram30    deallocate(mp2)31  end subroutine32end module33