From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A541C3858D28; Tue, 14 Dec 2021 15:43:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A541C3858D28 From: "amacleod at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103691] [12 Regression] ICE in get_array_ctor_element_at_index, at fold-const.c:13314 since r12-4694-gcb153222404e2e14 Date: Tue, 14 Dec 2021 15:43:42 +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: 12.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: amacleod at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2021 15:43:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103691 --- Comment #2 from Andrew Macleod --- Its triggering an assert in the gimple folder when trying to process: # DEBUG D.4293 =3D> &a[0] The constructor shows: static real(kind=3D4) a[0] =3D {[0 ... -1]=3D2.0e+0}; is that a range of 0 to -1? its triggering an assert in line 13314 of fold_const: gcc_checking_assert (wi::le_p (index, max_index, index_sgn)); it looks to be because max_index is less than index? The referenced change causes this because it now calls gimple_fold on all s= tmts instead of just ranger specific ones. I presume we are suppose to call fol= d on debug stmts too?=