This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Correct make_decl_rtl for file-scope functions
- From: Mark Mitchell <mark at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: geoffk at apple dot org
- Date: Fri, 11 Jul 2003 14:21:11 -0700
- Subject: PATCH: Correct make_decl_rtl for file-scope functions
- Reply-to: mark at codesourcery dot com
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;