This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix for regression due to SYMBOL_REF patch to dwarf2out.c
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Subject: Re: Fix for regression due to SYMBOL_REF patch to dwarf2out.c
- From: Jason Merrill <jason_merrill at redhat dot com>
- Date: 06 Jul 2001 12:36:38 +0100
- Cc: gcc-patches at gcc dot gnu dot org, Nick Clifton <nickc at cambridge dot redhat dot com>
- References: <3AF458CD.D38E39B@moene.indiv.nluug.nl>
I've finally applied this patch. Nick, does this still work for your
original testcase?
2001-07-02 Jason Merrill <jason_merrill@redhat.com>
* dwarf2out.c (mem_loc_descriptor): Only look through a constant pool
reference if the target constant is also a SYMBOL_REF.
*** dwarf2out.c.~1~ Fri Jul 6 12:31:01 2001
--- dwarf2out.c Thu Jul 5 18:03:58 2001
*************** mem_loc_descriptor (rtl, mode)
*** 7427,7443 ****
pool. */
case CONST:
case SYMBOL_REF:
! /* Alternatively, the symbol in the constant pool can be referenced
by a different symbol. */
if (GET_CODE (rtl) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (rtl))
{
rtx tmp = get_pool_constant (rtl);
! /* Doesn't work for floating point constants. */
! if (! (GET_CODE (tmp) == CONST_DOUBLE && GET_MODE (tmp) != VOIDmode))
rtl = tmp;
}
-
mem_loc_result = new_loc_descr (DW_OP_addr, 0, 0);
mem_loc_result->dw_loc_oprnd1.val_class = dw_val_class_addr;
--- 7427,7441 ----
pool. */
case CONST:
case SYMBOL_REF:
! /* Alternatively, the symbol in the constant pool might be referenced
by a different symbol. */
if (GET_CODE (rtl) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (rtl))
{
rtx tmp = get_pool_constant (rtl);
! if (GET_CODE (tmp) == SYMBOL_REF)
rtl = tmp;
}
mem_loc_result = new_loc_descr (DW_OP_addr, 0, 0);
mem_loc_result->dw_loc_oprnd1.val_class = dw_val_class_addr;