diff mbox

[2/9] cfgcleanup: Don't confuse CFI when -fshrink-wrap-separate

Message ID fb82454b97ee355c6c02032d773ffb9a9ebb7b2c.1465347472.git.segher@kernel.crashing.org
State New
Headers show

Commit Message

Segher Boessenkool June 8, 2016, 1:47 a.m. UTC
cfgcleanup would try to join noreturn paths with different concerns handled.
This then fails in dwarf2cfi.


2016-06-07  Segher Boessenkool  <segher@kernel.crashing.org>

	* cfgcleanup.c (outgoing_edges_match): Don't join noreturn calls
	if shrink_wrapped_separate.

---
 gcc/cfgcleanup.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 023b9d2..f08e4ee 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -1824,6 +1824,11 @@  outgoing_edges_match (int mode, basic_block bb1, basic_block bb2)
           || !find_reg_note (last1, REG_ARGS_SIZE, NULL)))
     return false;
 
+  /* If shrink-wrapping separate concerns, joining noreturn calls that
+     have different concerns set up will confuse dwarf2cfi.  */
+  if (!nonfakeedges && crtl->shrink_wrapped_separate)
+    return false;
+
   /* fallthru edges must be forwarded to the same destination.  */
   if (fallthru1)
     {