*** empty log message ***
authorJim Wilson <wilson@gcc.gnu.org>
Tue, 5 May 1992 17:49:09 +0000 (10:49 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 5 May 1992 17:49:09 +0000 (10:49 -0700)
From-SVN: r906

gcc/dbxout.c
gcc/integrate.c

index 3e0de048d81e4c7bd433ef9aed396ce7dd08ed8a..38bbd22cee151f21e09dbb153238ce655d6bcea2 100644 (file)
@@ -1519,7 +1519,7 @@ dbxout_symbol (decl, local)
            {
              current_sym_addr = XEXP (DECL_RTL (decl), 0);
 
-             letter = TREE_PERMANENT (decl) ? 'S' : 'V';
+             letter = decl_function_context (decl) ? 'V' : 'S';
 
              if (!DECL_INITIAL (decl))
                current_sym_code = N_LCSYM;
index 0faf0793fbd609b8f578227886929142066d7b98..cde43fa5c757c7e3c4cc216371dbff3b4620ce3c 100644 (file)
@@ -1875,7 +1875,26 @@ copy_rtx_and_substitute (orig, map)
     case PC:
     case CC0:
     case CONST_INT:
+      return orig;
+
     case SYMBOL_REF:
+      /* Symbols which represent the address of a label stored in the constant
+        pool must be modified to point to a constant pool entry for the
+        remapped label.  Otherwise, symbols are returned unchanged.  */
+      if (CONSTANT_POOL_ADDRESS_P (orig))
+       {
+         rtx constant = get_pool_constant (orig);
+         if (GET_CODE (constant) == LABEL_REF)
+           {
+             copy = rtx_alloc (LABEL_REF);
+             PUT_MODE (copy, mode);
+             XEXP (copy, 0)
+               = map->label_map[CODE_LABEL_NUMBER (XEXP (constant, 0))];
+             LABEL_OUTSIDE_LOOP_P (copy) = LABEL_OUTSIDE_LOOP_P (orig);
+             copy = force_const_mem (Pmode, copy);
+             return XEXP (copy, 0);
+           }
+       }
       return orig;
 
     case CONST_DOUBLE: