aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNick Clifton <nickc@cambridge.redhat.com>2001-04-24 08:06:04 +0000
committerNick Clifton <nickc@gcc.gnu.org>2001-04-24 08:06:04 +0000
commitc6f9b9a14126a36d97ae9cbb59064eab067d2edc (patch)
tree4fd74437620d66420792793db1fde22210abb762 /gcc
parentb201442f5440b21d9be81a1c6b868cfebf9247f5 (diff)
downloadgcc-c6f9b9a14126a36d97ae9cbb59064eab067d2edc.zip
gcc-c6f9b9a14126a36d97ae9cbb59064eab067d2edc.tar.gz
gcc-c6f9b9a14126a36d97ae9cbb59064eab067d2edc.tar.bz2
If a SYMBOL_REF is in the constant pool, use the pool's SYMBOL_REF.
From-SVN: r41518
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/dwarf2out.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a083a5b..7569d12 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2001-04-24 Nick Clifton <nickc@cambridge.redhat.com>
+ * dwarf2out.c (mem_loc_descriptor): If a SYMBOL_REF is in the
+ constant pool, use the pool's SYMBOL_REF instead.
+
* config/v850/v850.h (STRICT_ALIGNMENT): Always set, even for the
v850e.
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9be55d8..b709d07 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);