From 9ea07fd00e87dcb4f7a69830e7627107e55bfd00 Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Fri, 23 Mar 2001 19:47:57 +0000 Subject: [PATCH] Re-add missing debug info for weak aliases. * varasm.c (make_decl_rtl): Add TREE_PUBLIC check to abort test. (assemble_alias): Call make_decl_rtl. From-SVN: r40791 --- gcc/ChangeLog | 5 +++++ gcc/varasm.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 72c25a4646b..a6ff3aa8a1d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2001-03-23 Jim Wilson + + * varasm.c (make_decl_rtl): Add TREE_PUBLIC check to abort test. + (assemble_alias): Call make_decl_rtl. + Fri Mar 23 16:59:08 2001 J"orn Rennecke * stor-layout.c (layout_type): Give OFFSET_TYPE a MODE_INT type. diff --git a/gcc/varasm.c b/gcc/varasm.c index 694b0b0ee8b..3a6d61dfa41 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -580,10 +580,12 @@ make_decl_rtl (decl, asmspec) int reg_number; /* Check that we are not being given an automatic variable. */ + /* A weak alias has TREE_PUBLIC set but not the other bits. */ if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == RESULT_DECL || (TREE_CODE (decl) == VAR_DECL && !TREE_STATIC (decl) + && !TREE_PUBLIC (decl) && !DECL_EXTERNAL (decl) && !DECL_REGISTER (decl))) abort (); @@ -4796,6 +4798,10 @@ assemble_alias (decl, target) { const char *name; + /* We must force creation of DECL_RTL for debug info generation, even though + we don't use it here. */ + make_decl_rtl (decl, NULL_PTR); + name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); #ifdef ASM_OUTPUT_DEF -- 2.30.2