brintos

brintos / llvm-project-archived public Read only

0
0
Text · 572 B · f133276 Raw
22 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12 3module m14  type :: t5  end type6 contains7  pure subroutine s1(x)8    class(t), intent(in out) :: x9    call s2(x)10    call s3(x)11  end subroutine12  pure subroutine s2(x)13    class(t), intent(in out) :: x14    !ERROR: Left-hand side of intrinsic assignment may not be polymorphic unless assignment is to an entire allocatable15    x = t()16  end subroutine17  pure subroutine s3(x)18    !ERROR: An INTENT(OUT) dummy argument of a pure subroutine may not be polymorphic19    class(t), intent(out) :: x20  end subroutine21end module22