local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions are shared.
authorJeffrey A Law <law@cygnus.com>
Wed, 22 Oct 1997 15:58:33 +0000 (15:58 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 22 Oct 1997 15:58:33 +0000 (09:58 -0600)
        * local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions
        are shared.

From-SVN: r16147

gcc/ChangeLog
gcc/local-alloc.c

index baf8257566344de4ed145ca5132742cad202ff21..d5c3c8e35e60ebe252cb9f0d71fc5b8dd042778e 100644 (file)
@@ -1,5 +1,8 @@
 Wed Oct 22 00:34:12 1997  Jeffrey A Law  (law@cygnus.com)
 
+       * local-alloc.c (block_alloc): Don't lose if two SCRATCH expressions
+       are shared.
+
        * rs6000.md (*movsi_got_internal_mem): New pattern.
        (*movsi_got_internal_mem splitter): New define_split.
 
index 7a3e103c6bf61635a588b7fa7fcab6196760c94f..ce7b4b9f405f2b3bcff3e4929cd984aac01654d2 100644 (file)
@@ -1714,17 +1714,12 @@ block_alloc (b)
          {
            if (GET_CODE (qty_scratch_rtx[q]) == REG)
              abort ();
-           PUT_CODE (qty_scratch_rtx[q], REG);
-           REGNO (qty_scratch_rtx[q]) = qty_phys_reg[q];
+
+           qty_scratch_rtx[q] = gen_rtx (REG, GET_MODE (qty_scratch_rtx[q]),
+                                         qty_phys_reg[q]);
 
            scratch_block[scratch_index] = b;
            scratch_list[scratch_index++] = qty_scratch_rtx[q];
-
-           /* Must clear the USED field, because it will have been set by
-              copy_rtx_if_shared, but the leaf_register code expects that
-              it is zero in all REG rtx.  copy_rtx_if_shared does not set the
-              used bit for REGs, but does for SCRATCHes.  */
-           qty_scratch_rtx[q]->used = 0;
          }
       }
 }