1! RUN: %python %S/test_errors.py %s %flang_fc1 2 3module m1 4 type :: t 5 end type 6 contains 7 pure subroutine s1(x) 8 class(t), intent(in out) :: x 9 call s2(x) 10 call s3(x) 11 end subroutine 12 pure subroutine s2(x) 13 class(t), intent(in out) :: x 14 !ERROR: Left-hand side of assignment may not be polymorphic unless assignment is to an entire allocatable 15 !ERROR: Left-hand side of assignment is not definable 16 !BECAUSE: 'x' is polymorphic in a pure subprogram 17 x = t() 18 end subroutine 19 pure subroutine s3(x) 20 !ERROR: An INTENT(OUT) dummy argument of a pure subroutine may not be polymorphic 21 class(t), intent(out) :: x 22 end subroutine 23end module 24