[PATCH] fix to cfganal.c for target/5469

Richard Henderson rth@redhat.com
Thu Feb 7 17:34:00 GMT 2002


On Thu, Feb 07, 2002 at 03:54:51PM +0000, Graham Stott wrote:
> Fixing the missing prototype warning give a hard error because the
> code has a bug, general_operand takes two parameters not one.

Doh.


r~

        * cfgrtl.c: Include recog.h and insn-config.h.
        (keep_with_call_p): Fix general_operand invocation.
        * Makefile.in (cfgrtl.o): Update dependencies.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.827
diff -c -p -d -u -r1.827 Makefile.in
--- Makefile.in	2002/02/05 17:56:32	1.827
+++ Makefile.in	2002/02/08 00:33:21
@@ -1488,8 +1488,8 @@ cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) $(
 cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \
    $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
    function.h except.h $(GGC_H) $(TM_P_H)
-cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) \
-   $(BASIC_BLOCK_H) hard-reg-set.h $(GGC_H)
+cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(BASIC_BLOCK_H) \
+   hard-reg-set.h insn-config.h $(RECOG_H) $(GGC_H) $(TM_P_H)
 cfgbuild.o : cfgbuild.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h insn-config.h \
    $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
    function.h except.h $(GGC_H) 
Index: cfganal.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfganal.c,v
retrieving revision 1.14
diff -c -p -d -u -r1.14 cfganal.c
--- cfganal.c	2002/02/06 18:16:02	1.14
+++ cfganal.c	2002/02/08 00:33:21
@@ -25,6 +25,8 @@ Software Foundation, 59 Temple Place - S
 #include "rtl.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
+#include "insn-config.h"
+#include "recog.h"
 #include "toplev.h"
 #include "obstack.h"
 #include "tm_p.h"
@@ -225,7 +227,7 @@ keep_with_call_p (insn)
     {
       if (GET_CODE (SET_DEST (set)) == REG
 	  && fixed_regs[REGNO (SET_DEST (set))]
-	  && general_operand (SET_SRC (set)))
+	  && general_operand (SET_SRC (set), VOIDmode))
 	return true;
       if (GET_CODE (SET_SRC (set)) == REG
 	  && FUNCTION_VALUE_REGNO_P (REGNO (SET_SRC (set)))



More information about the Gcc-patches mailing list