https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102893
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:6d9c2ed02128ddf327465333f5563500b6cf8886 commit r11-9587-g6d9c2ed02128ddf327465333f5563500b6cf8886 Author: Richard Biener <rguent...@suse.de> Date: Fri Oct 22 12:45:32 2021 +0200 tree-optimization/102893 - properly DCE empty loops inside infinite loops The following fixes the test for an exit edge I put in place for the fix for PR45178 where I somehow misunderstood how the cyclic list works. 2021-10-22 Richard Biener <rguent...@suse.de> PR tree-optimization/102893 * tree-ssa-dce.c (find_obviously_necessary_stmts): Fix the test for an exit edge. * gcc.dg/tree-ssa/ssa-dce-9.c: New testcase. (cherry picked from commit c2a9a98a369528c8689ecb68db576f8e7dc2fa45)