https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89188
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Aug 30 11:42:17 2019 New Revision: 275101 URL: https://gcc.gnu.org/viewcvs?rev=275101&root=gcc&view=rev Log: Backported from mainline 2019-02-05 Jakub Jelinek <ja...@redhat.com> 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. * g++.dg/opt/pr89188.C: New test. Added: branches/gcc-7-branch/gcc/testsuite/g++.dg/opt/pr89188.C Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/dce.c branches/gcc-7-branch/gcc/testsuite/ChangeLog