| ! Check that if a data reference passed is as actual argument whose dummy |
| ! has INTENT(OUT) attribute, any other argument depending on the |
| ! same data reference is evaluated before the data reference deallocation. |
| class(t), allocatable :: ta |
| type(u), allocatable :: c(:) |
| allocate(c, source = [u(t(1)), u(t(4))]) |
| allocated (c(c(1)%ta%i)%ta), & |
| allocated (c(c(1)%ta%i)%ta) & |
| if (allocated (c(1)%ta)) stop 11 |
| if (.not. allocated (c(2)%ta)) stop 12 |
| subroutine bar (alloc, x, alloc2) |
| class(t), allocatable, intent(out) :: x(..) |
| if (allocated (x)) stop 1 |