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