From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 921AA385840A; Fri, 22 Oct 2021 10:44:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 921AA385840A From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102893] [9/10/11/12 Regression] CDDCE does not detect empty infinite nested loops Date: Fri, 22 Oct 2021 10:44:48 +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: 8.5.0 X-Bugzilla-Keywords: missed-optimization 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: 9.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed assigned_to target_milestone cf_reconfirmed_on short_desc 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: Fri, 22 Oct 2021 10:44:48 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102893 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org Target Milestone|--- |9.5 Last reconfirmed| |2021-10-22 Summary|[8/9/10/11/12 Regression] |[9/10/11/12 Regression] |CDDCE does not detect empty |CDDCE does not detect empty |infinite nested loops |infinite nested loops --- Comment #1 from Richard Biener --- Hm, there's /* For loops without an exit do not mark any condition. */ if (loop->exits->next && !finite_loop_p (loop)) but here (gdb) p loop->exits $2 =3D (loop_exit *) 0x7ffff6690440 (gdb) p loop->exits->next $3 =3D (loop_exit *) 0x7ffff6690440 (gdb) p *loop->exits $5 =3D {e =3D , prev =3D 0x7ffff6690440, next =3D 0x7ffff6690440,= =20 next_e =3D 0x0} so I suppose I misunderstood how loop->exits works, looks like ->e has to be non-NULL as well. But that means the testcase I added this check for somehow did not have loop->exits->next?! Mine.=