From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B9504392AC0F; Tue, 15 Nov 2022 18:52:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9504392AC0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1668538324; bh=h0Vouvh8pOGsbHcNWBwg73+sqcWMjzPlLb8AiwMEMv8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fvGloFLdlh3wWB0hVXtST/YD87leEiuJ6RyWvZWIqs8MzBBc/x0S1ZcjMREhO+dcK WxrsA4mCqKXbCL3TuokTjaAibQ6D9tipYBLDxiZpn+X5DckXOum32MgumkaMurFNCR bQMc8ZXsbV+msXt0UTQOn8yxP08rzWOppVejpuU0= From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107707] ICE in gfc_compare_actual_formal, at fortran/interface.cc:3284 Date: Tue, 15 Nov 2022 18:52:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed cc cf_reconfirmed_on priority bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107707 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |kargl at gcc dot gnu.org Last reconfirmed| |2022-11-15 Priority|P3 |P4 Status|UNCONFIRMED |NEW --- Comment #1 from kargl at gcc dot gnu.org --- Another example of why -fmax-errors=3D1 should be the default. A run-on warning triggers tried to get a gmp value from a BT_REAL entity. Fixed by diff --git a/gcc/fortran/interface.cc b/gcc/fortran/interface.cc index d3e199535b3..ce68d863fdf 100644 --- a/gcc/fortran/interface.cc +++ b/gcc/fortran/interface.cc @@ -3271,10 +3271,14 @@ gfc_compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, and assumed-shape dummies, the string length needs to match exactly. */ if (a->expr->ts.type =3D=3D BT_CHARACTER - && a->expr->ts.u.cl && a->expr->ts.u.cl->length + && a->expr->ts.u.cl + && a->expr->ts.u.cl->length + && a->expr->ts.u.cl->length->ts.type =3D=3D BT_INTEGER && a->expr->ts.u.cl->length->expr_type =3D=3D EXPR_CONSTANT - && f->sym->ts.type =3D=3D BT_CHARACTER && f->sym->ts.u.cl + && f->sym->ts.type =3D=3D BT_CHARACTER + && f->sym->ts.u.cl && f->sym->ts.u.cl->length + && f->sym->ts.u.cl->length->ts.type =3D=3D BT_INTEGER && f->sym->ts.u.cl->length->expr_type =3D=3D EXPR_CONSTANT && (f->sym->attr.pointer || f->sym->attr.allocatable || (f->sym->as && f->sym->as->type =3D=3D AS_ASSUMED_SHAPE))=