aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-11-23 09:18:25 +0000
committerRichard Stallman <rms@gnu.org>1993-11-23 09:18:25 +0000
commit1f17868aa6caa16f285b15c5c8fc221c5f83b781 (patch)
tree1c46fa95cc3de47c22872ac94d765a8244520ee9
parent1be07046359570d2e482b49f1d2a184141410a2a (diff)
downloadgcc-1f17868aa6caa16f285b15c5c8fc221c5f83b781.zip
gcc-1f17868aa6caa16f285b15c5c8fc221c5f83b781.tar.gz
gcc-1f17868aa6caa16f285b15c5c8fc221c5f83b781.tar.bz2
(output_local_subroutine_die): Use the function name
from its symbol_ref, not DECL_ASSEMBLER_NAME. From-SVN: r6142
-rw-r--r--gcc/dwarfout.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c
index 1300afd..70dc51e 100644
--- a/gcc/dwarfout.c
+++ b/gcc/dwarfout.c
@@ -3557,8 +3557,22 @@ output_local_subroutine_die (arg)
if (TREE_ASM_WRITTEN (decl))
{
char label[MAX_ARTIFICIAL_LABEL_BYTES];
+ rtx x;
+ char *fnname;
- low_pc_attribute (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
+ /* Get the function's name, as described by its RTL.
+ This may be different from the DECL_NAME name used
+ in the source file. */
+
+ x = DECL_RTL (decl);
+ if (GET_CODE (x) != MEM)
+ abort ();
+ x = XEXP (x, 0);
+ if (GET_CODE (x) != SYMBOL_REF)
+ abort ();
+ fnname = XSTR (x, 0);
+
+ low_pc_attribute (fnname);
sprintf (label, FUNC_END_LABEL_FMT, current_funcdef_number);
high_pc_attribute (label);
sprintf (label, BODY_BEGIN_LABEL_FMT, current_funcdef_number);