From 7db5da56edab33b9dc4ab1991ad06d023c9516b1 Mon Sep 17 00:00:00 2001 From: Janus Weil Date: Wed, 4 Jun 2008 23:04:32 +0200 Subject: re PR fortran/36322 (ICE with PROCEDURE using a complicated interface) 2008-06-04 Janus Weil PR fortran/36322 PR fortran/36275 * resolve.c (resolve_symbol): Correctly copy the interface for a PROCEDURE declaration. 2008-06-04 Janus Weil PR fortran/36322 PR fortran/36275 * gfortran.dg/proc_decl_2.f90: Extended. From-SVN: r136372 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/resolve.c | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index fd0817b..826b409 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2008-06-04 Janus Weil + + PR fortran/36322 + PR fortran/36275 + * resolve.c (resolve_symbol): Correctly copy the interface for a + PROCEDURE declaration. + 2008-06-02 Janus Weil PR fortran/36361 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index c980935..b5b76b6 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -7893,11 +7893,12 @@ resolve_symbol (gfc_symbol *sym) /* Get the attributes from the interface (now resolved). */ if (sym->ts.interface->attr.if_source || sym->ts.interface->attr.intrinsic) { - sym->ts.type = sym->ts.interface->ts.type; - sym->ts.kind = sym->ts.interface->ts.kind; - sym->attr.function = sym->ts.interface->attr.function; - sym->attr.subroutine = sym->ts.interface->attr.subroutine; - copy_formal_args (sym, sym->ts.interface); + gfc_symbol *ifc = sym->ts.interface; + sym->ts = ifc->ts; + sym->ts.interface = ifc; + sym->attr.function = ifc->attr.function; + sym->attr.subroutine = ifc->attr.subroutine; + copy_formal_args (sym, ifc); } else if (sym->ts.interface->name[0] != '\0') { -- cgit v1.1