This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Patch Re: nothrow changes
- To: law at cygnus dot com
- Subject: Patch Re: nothrow changes
- From: Jason Merrill <jason at cygnus dot com>
- Date: 15 Mar 2000 23:35:22 -0800
- Cc: gcc at gcc dot gnu dot org
- References: <15383.953175541@upchuck>
>>>>> Jeffrey A Law <law@cygnus.com> writes:
> All the nothrow work (as a whole) has broken nonlocal gotos.
> When we later expand a call to that function we see TREE_NOTHROW is set
> and set the EH region on the generated CALL_INSN to -1, so flow thinks
> the call can not do a nonlocal goto or throw.
Oops.
2000-03-15 Jason Merrill <jason@casey.cygnus.com>
* calls.c (emit_call_1): Nothrow functions can still have nonlocal
gotos.
Index: calls.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/calls.c,v
retrieving revision 1.91
diff -c -p -r1.91 calls.c
*** calls.c 2000/03/09 20:34:51 1.91
--- calls.c 2000/03/16 07:31:51
*************** emit_call_1 (funexp, fndecl, funtype, st
*** 495,501 ****
/* If this call can't throw, attach a REG_EH_REGION reg note to that
effect. */
if (nothrow)
! REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, GEN_INT (-1),
REG_NOTES (call_insn));
/* Restore this now, so that we do defer pops for this call's args
--- 495,501 ----
/* If this call can't throw, attach a REG_EH_REGION reg note to that
effect. */
if (nothrow)
! REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, const0_rtx,
REG_NOTES (call_insn));
/* Restore this now, so that we do defer pops for this call's args