Commit 36f4d144 by Tobias Schlüter Committed by Tobias Schlüter

re PR fortran/17535 (gfortran with module procedures)

fortran/
PR fortran/17535
PR fortran/17583
PR fortran/17713
* module.c (write_symbol1): Set module_name for dummy arguments.

testsuite/
PR fortran/17535
PR fortran/17583
PR fortran/17713
* gfortran.dg/generic_[123].f90: New testcases.

From-SVN: r90011
parent fc706639
2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/17535
PR fortran/17583
PR fortran/17713
* module.c (write_symbol1): Set module_name for dummy arguments.
2004-11-02 Paul Brook <paul@codesourcery.com>
* intrinsic.c (check_intrinsic_standard): Include error locus.
......
......@@ -3269,6 +3269,11 @@ write_symbol1 (pointer_info * p)
if (p->type != P_SYMBOL || p->u.wsym.state != NEEDS_WRITE)
return 0;
/* FIXME: This shouldn't be necessary, but it works around
deficiencies in the module loader or/and symbol handling. */
if (p->u.wsym.sym->module[0] == '\0' && p->u.wsym.sym->attr.dummy)
strcpy (p->u.wsym.sym->module, module_name);
p->u.wsym.state = WRITTEN;
write_symbol (p->integer, p->u.wsym.sym);
......
2004-11-03 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/17535
PR fortran/17583
PR fortran/17713
* gfortran.dg/generic_[123].f90: New testcases.
2004-11-02 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/uninit-C.c: Remove special-casing for SPARC.
......
! { dg-do compile }
! reduced testcase from PR 17535
module FOO
interface BAR
subroutine BAR1(X)
integer :: X
end subroutine
subroutine BAR2(X)
real :: X
end subroutine
end interface
end module
subroutine BAZ(X)
use FOO
end subroutine
! { dg-do compile }
! testcase from PR 17583
module bidon
interface
subroutine drivexc(nspden,rho_updn)
integer, intent(in) :: nspden
integer, intent(in) :: rho_updn(nspden)
end subroutine drivexc
end interface
end module bidon
subroutine nonlinear(nspden)
use bidon
integer,intent(in) :: nspden
end subroutine nonlinear
! { dg-do compile }
! Testcase from PR 17713
module fit_functions
implicit none
contains
subroutine gauss( x, a, y, dy, ma )
double precision, intent(in) :: x
double precision, intent(in) :: a(:)
double precision, intent(out) :: y
double precision, intent(out) :: dy(:)
integer, intent(in) :: ma
end subroutine gauss
end module fit_functions
subroutine mrqcof( x, y, sig, ndata, a, ia, ma )
use fit_functions
implicit none
double precision, intent(in) :: x(:), y(:), sig(:)
integer, intent(in) :: ndata
double precision, intent(in) :: a(:)
integer, intent(in) :: ia(:), ma
integer i
double precision yan, dyda(ma)
do i = 1, ndata
call gauss( x(i), a, yan, dyda, ma )
end do
end subroutine mrqcof
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment