This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
libsupc++ compile failure on SGI Irix 6
- To: gcc-patches at gcc dot gnu dot org
- Subject: libsupc++ compile failure on SGI Irix 6
- From: Lee Iverson <leei at AI dot SRI dot COM>
- Date: Fri, 27 Apr 2001 11:46:39 -0700
Current sources generate an ICE while compiling eh_aux_runtime.cc in
libstdc++/libsupc++ on bootstrap with mips-sgi-irix6.5 (which btw now
seems to require an explicit --enable-sjlj-exceptions).
In any case, the error was obvious and easy to track down.
In except.c (expand_eh_region_end_cleanup) we have the following code:
/* In case this cleanup involves an inline destructor with a try block in
it, we need to save the EH return data registers around it. */
data_save[0] = gen_reg_rtx (Pmode);
emit_move_insn (data_save[0], get_exception_pointer ());
data_save[1] = gen_reg_rtx (Pmode);
emit_move_insn (data_save[1], get_exception_filter ());
and then the following:
static rtx
get_exception_filter ()
{
rtx filter = cfun->eh->filter;
if (! filter)
{
filter = gen_reg_rtx (word_mode);
cfun->eh->filter = filter;
}
return filter;
}
When PMode != word_mode the emit_move_insn generates an ICE.
The following patch fixes the obvious mismatch.
-------------------------------------------------------------------------------
Lee Iverson SRI International
leei@ai.sri.com 333 Ravenswood Ave., Menlo Park CA 94025
http://www.ai.sri.com/~leei/ (650) 859-3307
-------------------------------------------------------------------------------
2001-04-27 Lee Iverson <leei@Canada.AI.SRI.COM>
* except.c (expand_eh_region_end_cleanup): Use word_mode for
get_exception_filter return to match allocated register.
Index: except.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/except.c,v
retrieving revision 1.154
diff -p -u -r1.154 except.c
--- except.c 2001/04/26 23:32:49 1.154
+++ except.c 2001/04/27 18:40:06
@@ -739,7 +739,7 @@ expand_eh_region_end_cleanup (handler)
it, we need to save the EH return data registers around it. */
data_save[0] = gen_reg_rtx (Pmode);
emit_move_insn (data_save[0], get_exception_pointer ());
- data_save[1] = gen_reg_rtx (Pmode);
+ data_save[1] = gen_reg_rtx (word_mode);
emit_move_insn (data_save[1], get_exception_filter ());
expand_expr (handler, const0_rtx, VOIDmode, 0);