view gcc/testsuite/gfortran.dg/generic_4.f90 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { dg-do run }
! reduced testcase from PR 17740
module FOO

  interface BAR
     module procedure BAR2
  end interface

contains

  elemental integer function BAR2(X)
    integer, intent(in) :: X
    BAR2 = X
  end function

  subroutine BAZ(y,z)
    integer :: Y(3), Z(3)
    Z = BAR(Y)
  end subroutine

end module

use foo
integer :: y(3), z(3)
y = (/1,2,3/)
call baz(y,z)
if (any (y /= z)) STOP 1
end