summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-24 08:06:04 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2001-04-24 08:06:04 +0000
commitefdf6c61d20794d16b5edd90215ebde361e71556 (patch)
tree4fd74437620d66420792793db1fde22210abb762 /gcc/dwarf2out.c
parentcc5281c39605dd62d40c1eb99c2c8e88a3c41690 (diff)
downloadgcc-efdf6c61d20794d16b5edd90215ebde361e71556.tar.gz
If a SYMBOL_REF is in the constant pool, use the pool's SYMBOL_REF.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41518 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9be55d8ff6d..b709d07ee07 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -7117,6 +7117,12 @@ mem_loc_descriptor (rtl, mode)
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))
+ rtl = get_pool_constant (rtl);
+
mem_loc_result = new_loc_descr (DW_OP_addr, 0, 0);
mem_loc_result->dw_loc_oprnd1.val_class = dw_val_class_addr;
mem_loc_result->dw_loc_oprnd1.v.val_addr = save_rtx (rtl);