aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/generic_4.f90
blob: 62bc569a21c269b43b4e6c036d32a9739f93fb57 (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
25
26
27
28
! { 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)) call abort ()
end