C++ test-case regression

Richard Henderson rth@twiddle.net
Fri Jan 28 01:38:00 GMT 2000


On Fri, Jan 28, 2000 at 12:03:33AM -0800, Mark Mitchell wrote:
> 	* Makefile.in (flow.o): Depend on $(EXPR_H).
> 	* flow.c (mark_regs_live_at_end): Use hard_function_value, i.e.
> 	duplicate the structure of diddle_return_value for keeping regs live.

Indeed.  Give this a shot -- I'm not convenient to an x86
box at present.


r~


	* Makefile.in (flow.o): Revert 25 Jan change.
	* flow.c (mark_regs_live_at_end): Likewise. 
	Use current_function_return_rtx instead.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/Makefile.in,v
retrieving revision 1.374
diff -u -p -d -r1.374 Makefile.in
--- Makefile.in	2000/01/27 20:40:24	1.374
+++ Makefile.in	2000/01/28 09:35:31
@@ -1573,7 +1573,7 @@ unroll.o : unroll.c $(CONFIG_H) system.h
    varray.h 
 flow.o : flow.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h insn-config.h \
    $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
-   insn-flags.h function.h except.h $(EXPR_H)
+   insn-flags.h function.h except.h
 combine.o : combine.c $(CONFIG_H) system.h $(RTL_H) flags.h function.h \
    insn-config.h insn-flags.h insn-codes.h insn-attr.h $(REGS_H) $(EXPR_H) \
    $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h
Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.208
diff -u -p -d -r1.208 flow.c
--- flow.c	2000/01/23 23:10:09	1.208
+++ flow.c	2000/01/28 09:35:33
@@ -2782,7 +2782,6 @@ static void
 mark_regs_live_at_end (set)
      regset set;
 {
-  tree type;
   int i;
 
   /* If exiting needs the right stack value, consider the stack pointer
@@ -2841,34 +2840,24 @@ mark_regs_live_at_end (set)
 
   /* Mark function return value.  */
 
-  type = TREE_TYPE (DECL_RESULT (current_function_decl));
-  if (type != void_type_node)
+  if (current_function_return_rtx)
     {
-      rtx outgoing;
-
-      if (current_function_returns_struct
-	  || current_function_returns_pcc_struct)
-	type = build_pointer_type (type);
-
-#ifdef FUNCTION_OUTGOING_VALUE
-      outgoing = FUNCTION_OUTGOING_VALUE (type, current_function_decl);
-#else
-      outgoing = FUNCTION_VALUE (type, current_function_decl);
-#endif
-
-      if (GET_CODE (outgoing) == REG)
-	mark_reg (set, outgoing);
-      else if (GET_CODE (outgoing) == PARALLEL)
+      if (GET_CODE (current_function_return_rtx) == REG
+	  && REGNO (current_function_return_rtx) < FIRST_PSEUDO_REGISTER)
 	{
-	  int len = XVECLEN (outgoing, 0);
+	  mark_reg (set, current_function_return_rtx);
+	}
+      else if (GET_CODE (current_function_return_rtx) == PARALLEL)
+	{
+	  int len = XVECLEN (current_function_return_rtx, 0);
 
 	  /* Check for a NULL entry, used to indicate that the parameter
 	     goes on the stack and in registers.  */
-	  i = (XEXP (XVECEXP (outgoing, 0, 0), 0) ? 0 : 1);
+	  i = (XEXP (XVECEXP (current_function_return_rtx, 0, 0), 0) ? 0 : 1);
 
 	  for ( ; i < len; ++i)
 	    {
-	      rtx r = XVECEXP (outgoing, 0, i);
+	      rtx r = XVECEXP (current_function_return_rtx, 0, i);
 	      if (GET_CODE (r) == REG)
 		mark_reg (set, r);
 	    }


More information about the Gcc-bugs mailing list