Fix m68k-aout build failure. Invalid insn abort while compiling newlib.
authorJim Wilson <wilson@cygnus.com>
Thu, 22 Oct 1998 22:49:04 +0000 (22:49 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 22 Oct 1998 22:49:04 +0000 (15:49 -0700)
* reload1.c (reload_as_needed): When rewrite POST_INC, verify
reg_reloaded_contents matches incremented pseudo.

From-SVN: r23235

gcc/ChangeLog
gcc/reload1.c

index cb9dd65aa474ab048980e360cbca50d5f1bd35be..22c2bd042ef8be42165fe676ef34495527282e7d 100644 (file)
@@ -1,5 +1,8 @@
 Thu Oct 22 22:34:42 1998  Jim Wilson  <wilson@cygnus.com>
 
+       * reload1.c (reload_as_needed): When rewrite POST_INC, verify
+       reg_reloaded_contents matches incremented pseudo.
+
        * v850/v850.c (v850_reorg): Call alter_subreg.  Delete subreg support.
 
 Fri Oct 23 11:11:56 1998  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
index 74d5ed4f42025bd75c3734800b5494e6dcc19d7f..a8cc1733804db33212340ee895545af67add3446 100644 (file)
@@ -4478,7 +4478,12 @@ reload_as_needed (live_known)
                     or we can't use the reload register for inheritance.  */
                  if ((code == POST_INC || code == POST_DEC)
                      && TEST_HARD_REG_BIT (reg_reloaded_valid,
-                                           REGNO (reload_reg_rtx[i])))
+                                           REGNO (reload_reg_rtx[i]))
+                     /* Make sure it is the inc/dec pseudo, and not
+                        some other (e.g. output operand) pseudo.  */
+                     && (reg_reloaded_contents[REGNO (reload_reg_rtx[i])]
+                         == REGNO (XEXP (in_reg, 0))))
+                                             
                    {
                      rtx reload_reg = reload_reg_rtx[i];
                      enum machine_mode mode = GET_MODE (reload_reg);