https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81308
Jeffrey A. Law <law at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at redhat dot com --- Comment #6 from Jeffrey A. Law <law at redhat dot com> --- These are caused by distinct issues. THe first is a problem with an RTL pass (insn splitting), the second is a problem with a gimple pass (switch conversion). For the first case we could try to fix this in the backend. I believe the original insn is marked as having an EH edge because we've enabled -fnon-call-exceptions. So the float_truncate itself might signal. ISTM that we really need to be doing a CFG cleanup after splitting if we potentially could have removed a throwing insn. Fixing switch conversion for the second test is pretty trivial. group_case_labels removes the edge from the switch to the __builtin_unreachable case. This leaves the block unreachable and of course causes the failure in computation of the dominance tree. Tracking whether or not the CFG was altered and thus we need to return TODO_cleanup_cfg is sufficient to address this problem.