If a SYMBOL_REF is in the constant pool, use the pool's SYMBOL_REF.
authorNick Clifton <nickc@cambridge.redhat.com>
Tue, 24 Apr 2001 08:06:04 +0000 (08:06 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 24 Apr 2001 08:06:04 +0000 (08:06 +0000)
From-SVN: r41518

gcc/ChangeLog
gcc/dwarf2out.c

index a083a5b8ae76ab5a32c23dc9db9db1379de15ef0..7569d1225ba3202f5a0916ddc67772eac4a0e4d1 100644 (file)
@@ -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.
 
index 9be55d8ff6d396f8c07b55c1a37b8f6279c1da17..b709d07ee075ddc79af59ca46b0e30e89c2d7c99 100644 (file)
@@ -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);