This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch (refresh): ICE: while compiling libobjc/sendmsg.c for Alpha 32.


(Sorry; ignore the prior version; it got away too soon.)

Donn
-- 

===================================================
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: while compiling libobjc/sendmsg.c for Alpha 32.

This is the third in the series of 32-bit alpha fixes.

Cause: expand_assignment() is called with a LHS (to) of a in-memory
pointer (32-bits) and a RHS (from) of the result of
__builtin_apply_args, which is a Pmode (64-bit) pointer.
expand_assignment() tries to do the actual move with emit_move_insn(),
which can't do that.

Add this case to expand_assignment's abilities.

It's not unreasonable to argue that __builtin_apply_args() should
be declared ptr_mode, but I haven't investigated that because, again,
assignment from a 64-bit in-register pointer to a 32-bit in-memory
pointer seems quite reasonable, and needs to work.

This could also be implemented with a narrower scoped function than
convert_move (e.g. pointer_move) but that also seems less general and
robust.

	* expr.c(expand_assignment): Allow cross-type assignment.

diff -urP egcs.source.old//gcc/expr.c egcs.source/gcc/expr.c
--- egcs.source.old//gcc/expr.c	Wed Feb 17 15:28:44 1999
+++ egcs.source/gcc/expr.c	Wed Feb 17 17:42:32 1999
@@ -3409,8 +3421,10 @@
       else if (GET_MODE (to_rtx) == BLKmode)
 	emit_block_move (to_rtx, value, expr_size (from),
 			 TYPE_ALIGN (TREE_TYPE (from)) / BITS_PER_UNIT);
-      else
+      else if (GET_MODE(to_rtx) == GET_MODE(value))
 	emit_move_insn (to_rtx, value);
+      else
+	convert_move (to_rtx, value, TREE_UNSIGNED (TREE_TYPE (from)));
       preserve_temp_slots (to_rtx);
       free_temp_slots ();
       pop_temp_slots ();

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]