This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/6381: [PATCH] Missing assembler label
- From: Jason Merrill <jason at redhat dot com>
- To: jason at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 7 May 2002 15:16:05 -0000
- Subject: Re: c++/6381: [PATCH] Missing assembler label
- Reply-to: Jason Merrill <jason at redhat dot com>
The following reply was made to PR c++/6381; it has been noted by GNATS.
From: Jason Merrill <jason@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/6381: [PATCH] Missing assembler label
Date: Tue, 07 May 2002 16:14:22 +0100
--=-=-=
6381 is a regression whereby compiling with -g -O causes us to end up with
an undefined reference to a static local variable because we wrote out the
initializer for another variable in dwarf2out. The simple fix is to
disable the problematic code; it means that the debug info will be somewhat
less useful for unexpanded constants, but is safe.
Mark, can this go onto the branch? I'll work on a better fix for the trunk.
2002-05-07 Jason Merrill <jason@redhat.com>
* dwarf2out.c (rtl_for_decl_location): Don't try to extract a
constant value from DECL_INITIAL.
--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline
*** dwarf2out.c.~1~ Sun May 5 22:06:08 2002
--- dwarf2out.c Tue May 7 16:08:53 2002
*************** rtl_for_decl_location (decl)
*** 8942,8947 ****
--- 8946,8955 ----
rtl = gen_rtx_CONST_STRING (VOIDmode, TREE_STRING_POINTER (init));
}
+ #if 0
+ /* We mustn't actually emit anything here, as we might not get a
+ chance to emit any symbols we refer to. For the release, don't
+ try to get this right. */
if (rtl == NULL)
{
rtl = expand_expr (DECL_INITIAL (decl), NULL_RTX, VOIDmode,
*************** rtl_for_decl_location (decl)
*** 8951,8956 ****
--- 8959,8965 ----
if (rtl && GET_CODE (rtl) == MEM)
rtl = NULL;
}
+ #endif
}
#ifdef ASM_SIMPLIFY_DWARF_ADDR
--=-=-=--