From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 542753857348; Tue, 5 Dec 2023 07:30:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 542753857348 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701761413; bh=rIBCJtW01os5Ruh06bW4BuzOwP1/LDz/qKut76UomJc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=MN0XyqfNYqFqAYSj4dNTQ3+l6nJJZSPm43p6DDqUh03cE6RbGm6riz7+Cjxftv59X Br6fr6YKMfRndnE2PR0dUJVeqeahqtpbKzRBMrrgmE/PXgFvxaTBQP1wz0qvrWc4EC I4iIGxFBBtwZ2I/P6W2GP5VxaEZ6kLliyIzkPisc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/112827] [14 Regression] ICE on valid code at -O1 on x86_64-linux-gnu: Segmentation fault Date: Tue, 05 Dec 2023 07:30:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112827 --- Comment #7 from GCC Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:50f2a3370d177f8fe9bea0461feb710523e048a2 commit r14-6132-g50f2a3370d177f8fe9bea0461feb710523e048a2 Author: Richard Biener Date: Mon Dec 4 15:46:38 2023 +0100 tree-optimization/112827 - more SCEV cprop fixes The insert iteration can be corrupted by foldings of replace_uses_by, within this particular PHI replacement but also with subsequent ones. Recompute the insert location before insertion instead. This fixes an obvserved ICE of gcc.dg/tree-ssa/ssa-sink-16.c. PR tree-optimization/112827 PR tree-optimization/112848 * tree-scalar-evolution.cc (final_value_replacement_loop): Compute the insert location for each insert.=