1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! PDT sensitivity of FINAL subroutines
7 final
:: finalArr
, finalElem
10 subroutine finalArr(x
)
11 type(pdt(1)), intent(in out
) :: x(:)
13 elemental
subroutine finalElem(x
)
14 type(pdt(3)), intent(in out
) :: x
23 !ERROR: Left-hand side of assignment is not definable
24 !BECAUSE: Variable 'x1([INTEGER(8)::1_8])' has a vector subscript and cannot be finalized by non-elemental subroutine 'finalarr'
26 x2([1]) = pdt(2)() ! ok, doesn't match either
27 x3([1]) = pdt(3)() ! ok, calls finalElem