From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B94C33854831; Wed, 15 Mar 2023 09:47:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B94C33854831 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678873678; bh=94t8+4FEpO5gyJT8fktCJQUhoGXLrg6LTTqIDrZPrHc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Mrb4ttKe25tP69CC7N17TbHdjWU1tBMfQfqFfHRomyzUoAPsNA/2AcmPnuAGUyO/c A7X3OD/JIHMCcPlQ8c+1BA+9NgydWoamzuwHr1rik9ZulKCtyZ0wIcTVQC26F0+Jbm f2gTYrHLQC7YTmJeVvYoLggaT35zTMc5Y3VZD2Ik= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108625] [11/12 Regression] forwprop introduces new UB Date: Wed, 15 Mar 2023 09:47:58 +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: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 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=3D108625 --- Comment #4 from CVS Commits --- The releases/gcc-12 branch has been updated by Richard Biener : https://gcc.gnu.org/g:e19e9c36abc7fff9c628cf744e55e4c0e686ea53 commit r12-9257-ge19e9c36abc7fff9c628cf744e55e4c0e686ea53 Author: Richard Biener Date: Thu Feb 2 11:09:26 2023 +0100 middle-end/108625 - wrong folding due to misinterpreted ! The following fixes a problem with ! handling in genmatch which isn't conservative enough when intermediate simplifications push to the sequence but the final operation appears to just pick an existing (but in this case newly defined in the sequence) operand. The easiest fix is to disallow adding to the sequence when processing !. PR middle-end/108625 * genmatch.cc (expr::gen_transform): Also disallow resimplifica= tion from pushing to lseq with force_leaf. (dt_simplify::gen_1): Likewise. * gcc.dg/pr108625.c: New testcase. (cherry picked from commit 605d1297b91c2c7c23ccfe669e66dda5791d1f55)=