sparc bootstrap failure in stage1 linking cc1 + patch

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Wed Oct 20 13:02:00 GMT 1999


 > From: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
 > 
 > On Oct 13, 1999, Richard Henderson <rth@cygnus.com> wrote:
 > 
 > > On Wed, Oct 13, 1999 at 05:51:44PM -0400, Kaveh R. Ghazi wrote:
 > >> >               && (HAVE_epilogue || HAVE_prologue)
 > >> >               && prologue_epilogue_contains (insn))
 > >> 
 > >> The function `prologue_epilogue_contains' is only defined in
 > >> function.c if one of HAVE_epilogue or HAVE_prologue is defined.
 > 
 > > Bother.
 > 
 > >> Here's a patch.  Okay to install?
 > 
 > > No, I'd rather just have function.c define prologue_epilogue_contains.
 > > Makes for less ugly code.
 > 
 > Ok to install this one?
 > 
 > 	* function.c (record_insns, contains, prologue_epilogue_contains):
 > 	Define unconditionally. 
 > 	
 > Index: gcc/function.c
 > ===================================================================
 > RCS file: /cvs/gcc/egcs/gcc/function.c,v
 > retrieving revision 1.119
 > diff -u -r1.119 function.c
 > --- gcc/function.c	1999/10/03 16:28:33	1.119
 > +++ gcc/function.c	1999/10/20 19:34:26
 > @@ -6424,7 +6424,6 @@
 >  /* Create an array that records the INSN_UIDs of INSNS (either a sequence
 >     or a single insn).  */
 >  
 > -#if defined (HAVE_prologue) || defined (HAVE_epilogue)
 >  static int *
 >  record_insns (insns)
 >       rtx insns;
 > @@ -6486,7 +6485,6 @@
 >      return 1;
 >    return 0;
 >  }
 > -#endif /* HAVE_prologue || HAVE_epilogue */
 >  
 >  /* Generate the prologue and epilogue RTL if the machine supports it.  Thread
 >     this into place with notes indicating where the prologue ends and where
 > 

You need to also unconditionally declare the prototypes.  Also in
doing so, you should mark record_insns with ATTRIBUTE_UNUSED so it
doesn't warn because the code which calls it is still (correctly)
wrapped with the prologue/epilogue macros.  However about this
instead?

		--Kaveh

diff -rup orig/egcs-CVS19991016/gcc/function.c egcs-CVS19991016/gcc/function.c
--- orig/egcs-CVS19991016/gcc/function.c	Sun Oct  3 12:28:33 1999
+++ egcs-CVS19991016/gcc/function.c	Sat Oct 16 11:05:42 1999
@@ -263,10 +263,10 @@ static tree round_down		PROTO((tree, int
 static rtx round_trampoline_addr PROTO((rtx));
 static tree blocks_nreverse	PROTO((tree));
 static int all_blocks		PROTO((tree, tree *));
-#if defined (HAVE_prologue) || defined (HAVE_epilogue)
-static int *record_insns	PROTO((rtx));
+/* We always define `record_insns' even if its not used so that we
+   can always export `prologue_epilogue_contains'.  */
+static int *record_insns	PROTO((rtx)) ATTRIBUTE_UNUSED;
 static int contains		PROTO((rtx, int *));
-#endif /* HAVE_prologue || HAVE_epilogue */
 static void put_addressof_into_stack PROTO((rtx, struct hash_table *));
 static void purge_addressof_1	PROTO((rtx *, rtx, int, int, 
 				       struct hash_table *));
@@ -6424,7 +6424,6 @@ expand_function_end (filename, line, end
 /* Create an array that records the INSN_UIDs of INSNS (either a sequence
    or a single insn).  */
 
-#if defined (HAVE_prologue) || defined (HAVE_epilogue)
 static int *
 record_insns (insns)
      rtx insns;
@@ -6486,7 +6485,6 @@ prologue_epilogue_contains (insn)
     return 1;
   return 0;
 }
-#endif /* HAVE_prologue || HAVE_epilogue */
 
 /* Generate the prologue and epilogue RTL if the machine supports it.  Thread
    this into place with notes indicating where the prologue ends and where



More information about the Gcc-patches mailing list