This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: sjlj-exceptions ICE. simplified test case
- To: Robert Lipe <robertl at sco dot com>
- Subject: Re: sjlj-exceptions ICE. simplified test case
- From: Richard Henderson <rth at cygnus dot com>
- Date: Tue, 25 Apr 2000 17:47:25 -0700
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <20000423223401.A5548@rjlhome.sco.com> <20000425031515.A7610@cygnus.com> <20000425101154.M7516@rjlhome.sco.com>
On Tue, Apr 25, 2000 at 10:11:54AM -0500, Robert Lipe wrote:
> ../../egcs/gcc/cp/tinfo.cc: In method `bad_cast::bad_cast ()':
> ../../egcs/gcc/cp/tinfo.cc:1181: Internal compiler error.
This fixes that. It's the cudgel, but when considering delayed function
output (ie out-of-line inlines), I don't think there's an alternative.
As the comment describes, some of the machinery (cfun->stmt) has been
disassembled.
r~
* calls.c (expand_call): Disable tail call generation once
rtx_equal_function_value_matters is false.
Index: calls.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/calls.c,v
retrieving revision 1.124
diff -c -p -d -r1.124 calls.c
*** calls.c 2000/04/25 23:31:50 1.124
--- calls.c 2000/04/26 00:40:20
*************** expand_call (exp, target, ignore)
*** 2106,2116 ****
pushed these optimizations into -O2. Don't try if we're already
expanding a call, as that means we're an argument. Similarly, if
there's pending loops or cleanups we know there's code to follow
! the call. */
try_tail_call = 0;
if (flag_optimize_sibling_calls
&& currently_expanding_call == 1
&& stmt_loop_nest_empty ()
&& ! any_pending_cleanups (1))
{
--- 2106,2123 ----
pushed these optimizations into -O2. Don't try if we're already
expanding a call, as that means we're an argument. Similarly, if
there's pending loops or cleanups we know there's code to follow
! the call.
+ If rtx_equal_function_value_matters is false, that means we've
+ finished with regular parsing. Which means that some of the
+ machinery we use to generate tail-calls is no longer in place.
+ This is most often true of sjlj-exceptions, which we couldn't
+ tail-call to anyway. */
+
try_tail_call = 0;
if (flag_optimize_sibling_calls
&& currently_expanding_call == 1
+ && rtx_equal_function_value_matters
&& stmt_loop_nest_empty ()
&& ! any_pending_cleanups (1))
{
Index: reg-stack.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reg-stack.c,v
retrieving revision 1.57
diff -c -p -d -r1.57 reg-stack.c
*** reg-stack.c 2000/02/26 14:23:43 1.57
--- reg-stack.c 2000/04/26 00:40:20
*************** convert_regs_1 (file, block)
*** 2550,2556 ****
/* Care for EH edges specially. The normal return path may return
a value in st(0), but the EH path will not, and there's no need
to add popping code to the edge. */
! if (e->flags & EDGE_EH)
{
/* Assert that the lifetimes are as we expect -- one value
live at st(0) on the end of the source block, and no
--- 2550,2556 ----
/* Care for EH edges specially. The normal return path may return
a value in st(0), but the EH path will not, and there's no need
to add popping code to the edge. */
! if (e->flags & (EDGE_EH | EDGE_ABNORMAL_CALL))
{
/* Assert that the lifetimes are as we expect -- one value
live at st(0) on the end of the source block, and no