[PATCH] Fix -fsplit-stack with non-local gotos (PR target/79494)

Segher Boessenkool segher@kernel.crashing.org
Mon Feb 20 22:05:00 GMT 2017


Hi Jakub,

On Mon, Feb 20, 2017 at 09:42:26PM +0100, Jakub Jelinek wrote:
> We ICE on the following testcase, because we have abnormal edges
> from both __morestack call (which is before prologue) and call
> to the nested function (which is in between prologue and epilogue)
> to a label reachable through non-local goto.  This is something
> dwarf2cfi doesn't allow, it doesn't know what CFI state should
> be at that label.
> As __morestack really doesn't do non-local gotos and while it probably
> can throw, it is never something that can be caught in the function that
> calls __morestack, the following patch fixes it by telling middle-end
> that __morestack can't do nl goto.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

The rs6000 part is fine, thanks!


Segher


> 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR target/79494
> 	* config/i386/i386.c (ix86_expand_split_stack_prologue): Call
> 	make_reg_eh_region_note_nothrow_nononlocal on call_insn.
> 	* config/rs6000/rs6000.c: Include except.h.
> 	(rs6000_expand_split_stack_prologue): Call
> 	make_reg_eh_region_note_nothrow_nononlocal on the call insn.
> 
> 	* gcc.dg/pr79494.c: New test.



More information about the Gcc-patches mailing list