aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/elemental_function_1.f90
blob: 8f556f4b98edb4dbb570c4417ac21e59b237acb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
! { dg-do compile }
!
! PR fortran/52059
!
!

subroutine baz
  real(kind=8) :: a(99), b
  interface bar
    function bar (x, y)
      integer, intent(in) :: x, y
      real(kind=8), dimension((y-x)) :: bar
    end function bar
  end interface
  b = 1.0_8
  a = foo (bar(0,35) / dble(34), b)
contains
  elemental real(kind=8) function foo(x, y)
    real(kind=8), intent(in) :: x, y
    foo = 1
  end function foo
end subroutine baz