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]
Other format: [Raw text]

PATCH: Correct make_decl_rtl for file-scope functions


This patch makes sure that make_decl_rtl treats top-level functions as
top-level, thereby getting us past one bootstrap hurdle on
i686-pc-linux-gnu.

Applied on the mainline as obvious, after minimal testing.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2003-07-11  Mark Mitchell  <mark@codesourcery.com>

	* varasm.c (make_decl_rtl): Treat decls with a DECL_CONTEXT of
	TRANSLATION_UNIT_DECL as top_level.

Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.371
diff -c -5 -p -r1.371 varasm.c
*** varasm.c	7 Jul 2003 03:42:22 -0000	1.371
--- varasm.c	11 Jul 2003 21:17:46 -0000
*************** decode_reg_name (const char *asmspec)
*** 748,758 ****
     This is never called for PARM_DECL nodes.  */
  
  void
  make_decl_rtl (tree decl, const char *asmspec)
  {
!   int top_level = (DECL_CONTEXT (decl) == NULL_TREE);
    const char *name = 0;
    const char *new_name = 0;
    int reg_number;
    rtx x;
  
--- 748,760 ----
     This is never called for PARM_DECL nodes.  */
  
  void
  make_decl_rtl (tree decl, const char *asmspec)
  {
!   int top_level = (DECL_CONTEXT (decl) == NULL_TREE
! 		   || (TREE_CODE (DECL_CONTEXT (decl))
! 		       == TRANSLATION_UNIT_DECL));
    const char *name = 0;
    const char *new_name = 0;
    int reg_number;
    rtx x;
  


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