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]

ADDRESSOF broken


The compiler now crashes while compiling gcc.c-torture/compile/930117-1.c
with the new ADDRESSOF optimisation.  The problem is that the first
argument of a CALL insn must be a memory operand of some kind, but
purge_addressof does not force that.


1998-10-11  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>

	* function.c (purge_addressof_1): Force the first argument of a
	CALL insn to memory.

--- egcs-2.92/gcc/function.c.~1~	Wed Oct  7 23:52:35 1998
+++ egcs-2.92/gcc/function.c	Sun Oct 11 11:13:31 1998
@@ -2949,6 +2949,12 @@
       purge_addressof_1 (&SET_SRC (x), insn, force, 0);
       return;
     }
+  else if (code == CALL)
+    {
+      purge_addressof_1 (&XEXP (x, 0), insn, 1, 0);
+      purge_addressof_1 (&XEXP (x, 1), insn, force, 0);
+      return;
+    }
 
   /* Scan all subexpressions. */
   fmt = GET_RTX_FORMAT (code);

-- 
Andreas Schwab                                      "And now for something
schwab@issan.cs.uni-dortmund.de                      completely different"
schwab@gnu.org


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