| 1 |
! { dg-do compile } |
| 2 |
! PR fortran/89646 |
| 3 |
! Original testcase contributed by Ian Harvey <ian_harvey at bigpond dot com> |
| 4 |
! |
| 5 |
! This code use to give spurious warnings about aliasing. |
| 6 |
! |
| 7 |
module m |
| 8 |
implicit none |
| 9 |
type :: t |
| 10 |
end type t |
| 11 |
contains |
| 12 |
! To reproduce, both actual arguments must be TARGET, |
| 13 |
! both arguments must be of derived type. |
| 14 |
subroutine s |
| 15 |
type(t), target :: a(5) |
| 16 |
type(t), target :: b(5) |
| 17 |
call move(a, b) |
| 18 |
end subroutine s |
| 19 |
! To reproduce, called procedure must be elemental. |
| 20 |
elemental subroutine move(x, y) |
| 21 |
type(t), intent(inout) :: x |
| 22 |
type(t), intent(out) :: y |
| 23 |
end subroutine move |
| 24 |
end module m |