From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AA8953858D35; Mon, 13 Feb 2023 07:28:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AA8953858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1676273304; bh=YRRg3VS1T2Xh84W1MHXUhsPxP1OCs3oFMDNcqzwJdc4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=l68MJ1og3v7i3QPK5Yfs/WsWPjhCVjnaBF7Xt+uLHjcj6hXNZkNzWfux1XzLuzKjc I4IsD098RN/OfuiyCI28Zay4t+BjpQiIJSz8rVEsd90N6xRY3vt0FhUj0T3RdAH0gQ C/O+bahmGejkoPVosofNOLDc5Ce5MbMTjValjeq4= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108737] [13 Regression] Apparent miscompile of infinite loop on gcc trunk in cddce2 pass since r13-3875 Date: Mon, 13 Feb 2023 07:28:23 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution 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=3D108737 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #5 from Richard Biener --- I botched the changelog. Fixed with the following, but latent everywhere. commit 338739645b8e5bf34636d8d4829d7650001ad08c (origin/master, origin/HEAD) Author: Richard Biener Date: Fri Feb 10 10:28:29 2023 +0100 tree-optimization/106722 - fix CD-DCE edge marking The following fixes a latent issue when we mark control edges but end up with marking a block with no stmts necessary. In this case we fail to mark dependent control edges of that block. PR tree-optimization/106722 * tree-ssa-dce.cc (mark_last_stmt_necessary): Return whether we marked a stmt. (mark_control_dependent_edges_necessary): When mark_last_stmt_necessary didn't mark any stmt make sure to mark its control dependent edges. (propagate_necessity): Likewise. * gcc.dg/torture/pr108737.c: New testcase.=