OSDN Git Service

Do not segfault if SUBREG uses something other than REG.
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 May 1995 13:37:44 +0000 (13:37 +0000)
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 May 1995 13:37:44 +0000 (13:37 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9617 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/flow.c

index 5ebaf25..1143e53 100644 (file)
@@ -2382,6 +2382,13 @@ mark_used_regs (needed, live, x, final, insn)
              != GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))))
        reg_changes_size[REGNO (SUBREG_REG (x))] = 1;
 
+      /* In case the SUBREG is not of a register, don't optimize */
+      if (GET_CODE (SUBREG_REG (x)) != REG)
+       {
+         mark_used_regs (needed, live, SUBREG_REG (x), final, insn);
+         return;
+       }
+
       /* While we're here, optimize this case.  */
       x = SUBREG_REG (x);