1! { dg-do compile }
2! Testcase from PR 17713
3module fit_functions
4  implicit none
5contains
6  subroutine gauss( x, a, y, dy, ma )
7    double precision, intent(in)     :: x
8    double precision, intent(in)     :: a(:)
9    double precision, intent(out)    :: y
10    double precision, intent(out)    :: dy(:)
11    integer,          intent(in)     :: ma
12  end subroutine gauss
13end module fit_functions
14
15subroutine mrqcof( x, y, sig, ndata, a, ia, ma )
16  use fit_functions
17
18  implicit none
19  double precision, intent(in)   :: x(:), y(:), sig(:)
20  integer,   intent(in)          :: ndata
21  double precision, intent(in)   :: a(:)
22  integer,   intent(in)          :: ia(:), ma
23
24  integer                           i
25  double precision                  yan, dyda(ma)
26
27  do i = 1, ndata
28     call gauss( x(i), a, yan, dyda, ma )
29  end do
30end subroutine mrqcof
31