From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 647CB389040D; Thu, 25 Feb 2021 11:34:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 647CB389040D From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99101] optimization bug with -ffinite-loops Date: Thu, 25 Feb 2021 11:34:04 +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: 11.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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: Thu, 25 Feb 2021 11:34:04 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99101 --- Comment #14 from Richard Biener --- Oh, and the testcase does not require the abort () call but can do with a regular exit and no unreachable blocks: volatile int xx; int main() { int read_finish_ =3D 1; int jobs_ =3D 1; int at_eof_ =3D 0; while (1) { int num_job =3D jobs_; for (int i =3D 0; i < jobs_; i++) { if (at_eof_) continue; if (read_finish_) { at_eof_ =3D 1; __builtin_printf ("1\n"); if (xx) return 1; } } jobs_ -=3D num_job; } return 0; } but it then of course shows the same post-dominance structure and thus exhibits the same control dependences which do not agree with what CD-DCE expects.=