Patch: ICE: compiling cp/new1.cc -DL_op_newnt
Donn Terry
donn@interix.com
Thu Apr 15 15:59:00 GMT 1999
===================================================
Donn Terry mailto:donn@interix.com
Softway Systems, Inc. http://www.interix.com
2850 McClelland Dr, Ste. 1800 Ft.Collins CO 80525
Tel: +1-970-204-9900 Fax: +1-970-204-9951
===================================================
ICE: compiling cp/new1.cc -DL_op_newnt -- take 2.
Cause: start_catch_handler() (except.c) calls force_reg() on variable
rtime_address, which came from expand_expr, which did not honor
the *suggestion* of Pmode when expanding rtime, which is an in-memory
pointer. rtime is built by build_eh_type_type_ref(), which creates
it as ptr_type_node, which is an in-memory address type as far as
I can tell.
Fix:
Force the mode to Pmode, regardless.
ChangeLog
* except.c (start_catch_hadler): Be sure rtime_address is Pmode
if POINTERS_EXTEND_UNSIGNED.
diff -urP egcs.source.old/gcc/except.c egcs.source/gcc/except.c
--- egcs.source.old/gcc/except.c Thu Apr 15 09:19:47 1999
+++ egcs.source/gcc/except.c Thu Apr 15 12:47:09 1999
@@ -1760,6 +1760,9 @@ start_catch_handler (rtime)
catchstack.top->entry->false_label = gen_exception_label ();
rtime_address = expand_expr (rtime, NULL_RTX, Pmode, EXPAND_INITIALIZER);
+#ifdef POINTERS_EXTEND_UNSIGNED
+ rtime_address = convert_memory_address(Pmode, rtime_address);
+#endif
rtime_address = force_reg (Pmode, rtime_address);
/* Now issue the call, and branch around handler if needed */
More information about the Gcc-patches
mailing list