------- Comment #5 from jakub at gcc dot gnu dot org  2010-01-26 13:49 -------
Removing that special casing of CONSTANT_POOL_ADDRESS_P leads to invalid debug
info, which points to a bug in dwarf2out.c :(, he difference is:
 .8byte .LVL7-.Ltext0 # Location list begin address (*.LLST3)
 .8byte .LVL9-1-.Ltext0 # Location list end address (*.LLST3)
-.2byte 0xa # Location expression size
+.2byte 0x9 # Location expression size
 .byte 0x3 # DW_OP_addr
 .8byte d
-.byte 0x9f # DW_OP_stack_value
 .8byte 0x0 # Location list terminator begin (*.LLST3)
 .8byte 0x0 # Location list terminator end (*.LLST3)

The problem is a weird "optimization" in mem_loc_descriptor for SYMBOL_REF.
Replacing a SYMBOL_REF with a SYMBOL_REF get_pool_constant returned doesn't
look right, because that is one indirection away.  Say if get_pool_constant on
".LC2" symbol returns "d" symbol, it means (mem (symbol_ref ".LC2")) is
(symbol_ref "d"), not that (symbol_ref ".LC2") is the same as (symbol_ref "d").


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42861

Reply via email to