aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorJim Wilson <wilson@redhat.com>2001-03-23 19:47:57 +0000
committerJim Wilson <wilson@gcc.gnu.org>2001-03-23 11:47:57 -0800
commit9ea07fd00e87dcb4f7a69830e7627107e55bfd00 (patch)
treeee6e14153359f344de945ee20e1b0e0ebce9a2e7 /gcc/varasm.c
parentb124f72e29e5b0ff7b6cbd85fab0e9d4676d7b9f (diff)
downloadgcc-9ea07fd00e87dcb4f7a69830e7627107e55bfd00.zip
gcc-9ea07fd00e87dcb4f7a69830e7627107e55bfd00.tar.gz
gcc-9ea07fd00e87dcb4f7a69830e7627107e55bfd00.tar.bz2
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
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 694b0b0..3a6d61d 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