From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15254 invoked by alias); 14 Jul 2009 13:50:23 -0000 Received: (qmail 15172 invoked by uid 48); 14 Jul 2009 13:50:10 -0000 Date: Tue, 14 Jul 2009 13:50:00 -0000 Message-ID: <20090714135010.15171.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/40743] [4.5 Regression] ICE when compiling iso_varying_string.f95 at revision 149591 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "janus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg01113.txt.bz2 ------- Comment #6 from janus at gcc dot gnu dot org 2009-07-14 13:50 ------- The error goes away with the following patch: Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 149623) +++ gcc/fortran/resolve.c (working copy) @@ -9845,20 +9845,6 @@ resolve_symbol (gfc_symbol *sym) if (sym->formal_ns && sym->formal_ns != gfc_current_ns) gfc_resolve (sym->formal_ns); - /* Make sure the formal namespace is present. */ - if (sym->formal && !sym->formal_ns) - { - gfc_formal_arglist *formal = sym->formal; - while (formal && !formal->sym) - formal = formal->next; - - if (formal) - { - sym->formal_ns = formal->sym->ns; - sym->formal_ns->refs++; - } - } - /* Check threadprivate restrictions. */ if (sym->attr.threadprivate && !sym->attr.save && !sym->ns->save_all && (!sym->attr.in_common However, I don't quite see the connection yet. Also, this will regress e.g. on proc_ptr_22.f90 (which is the reason why I added this hunk for PR40646). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40743