From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 646C03858D1E; Tue, 24 Jan 2023 19:08:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 646C03858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674587320; bh=R/PBCeseb7HNGtUaMAD/HGX65E89zrwaeFL7JNO3XTM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=aA09bVFL5oirjyT47HOIw+uibjD3ZHxXnkcMgsjf33mlgHZlR/kL7Ch+03zAsRtp2 52wg81GXabCPvfyx+nG4XjHK5UCdXPuEIKMyVUdYHEVLnj67r4+I1LxPJG3o4sflh5 B+ebPAxELlozC1UyffRH4XaUUn0EZKjvzY8F3RCU= From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/108528] [13 Regression] ICE in gfc_compare_array_spec(): Array spec clobbered Date: Tue, 24 Jan 2023 19:08:40 +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: UNCONFIRMED 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: priority cc 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=3D108528 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- The help function causes an ICE when it can simply return false. This then lets gfortran send forth a few error messages. diff --git a/gcc/fortran/array.cc b/gcc/fortran/array.cc index e8a2c32a627..be5eb8b6a0f 100644 --- a/gcc/fortran/array.cc +++ b/gcc/fortran/array.cc @@ -967,7 +967,7 @@ gfc_copy_array_spec (gfc_array_spec *src) /* Returns nonzero if the two expressions are equal. - We should not need to support more than constant values, as that=C3=A2s= what is + We should not need to support more than constant values, as that's what= is allowed in derived type component array spec. However, we may create t= ypes with non-constant array spec for dummy variable class container types, = for which the _data component holds the array spec of the variable declarat= ion. @@ -979,7 +979,7 @@ compare_bounds (gfc_expr *bound1, gfc_expr *bound2) if (bound1 =3D=3D NULL || bound2 =3D=3D NULL || bound1->ts.type !=3D BT_INTEGER || bound2->ts.type !=3D BT_INTEGER) - gfc_internal_error ("gfc_compare_array_spec(): Array spec clobbered"); + return false; /* What qualifies as identical bounds? We could probably just check that the expressions are exact clones. We avoid rewriting a specific comparis= on=