https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89188
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Tue Feb 5 16:21:36 2019 New Revision: 268544 URL: https://gcc.gnu.org/viewcvs?rev=268544&root=gcc&view=rev Log: PR target/89188 * dce.c (delete_unmarked_insns): Don't remove no-op moves if they can throw, non-call exceptions are enabled and we can't delete dead exceptions or alter cfg. Set must_clean if delete_insn_and_edges returns true, don't set it blindly for calls. Assert that delete_unreachable_blocks is called only if can_alter_cfg. * g++.dg/opt/pr89188.C: New test. Added: trunk/gcc/testsuite/g++.dg/opt/pr89188.C Modified: trunk/gcc/ChangeLog trunk/gcc/dce.c trunk/gcc/testsuite/ChangeLog