From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30728 invoked by alias); 17 Oct 2012 19:22:48 -0000 Received: (qmail 30664 invoked by uid 48); 17 Oct 2012 19:22:36 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/54940] [4.6/4.7/4.8 Regression] ICE in gfc_build_intrinsic_call, at fortran/expr.c:4609 Date: Wed, 17 Oct 2012 19:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-10/txt/msg01584.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54940 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janus at gcc dot gnu.org --- Comment #2 from janus at gcc dot gnu.org 2012-10-17 19:22:34 UTC --- (In reply to comment #1) > The ICE starts with 4.6.3. The ICE occurs at > > gcc_assert (result->symtree > && (result->symtree->n.sym->attr.flavor == FL_PROCEDURE > || result->symtree->n.sym->attr.flavor == FL_UNKNOWN)); > > introduced by r183314 ... which was Tobias' fix for PR 51904. I think the most straightforward thing would be to just remove the assert again: Index: gcc/fortran/expr.c =================================================================== --- gcc/fortran/expr.c (revision 192392) +++ gcc/fortran/expr.c (working copy) @@ -4606,9 +4606,6 @@ gfc_build_intrinsic_call (const char* name, locus result->value.function.isym = isym; result->symtree = gfc_find_symtree (gfc_current_ns->sym_root, name); - gcc_assert (result->symtree - && (result->symtree->n.sym->attr.flavor == FL_PROCEDURE - || result->symtree->n.sym->attr.flavor == FL_UNKNOWN)); va_start (ap, numarg); atail = NULL; In a valid-code context the assert surely makes sense, but here it seems to choke on the fallout of the two errors.