re PR target/84828 (ICE in verify_flow_info at gcc/cfghooks.c:265)
authorJakub Jelinek <jakub@redhat.com>
Tue, 24 Apr 2018 07:40:04 +0000 (09:40 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 24 Apr 2018 07:40:04 +0000 (09:40 +0200)
PR target/84828
* reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
destination if any_malformed_asm.

From-SVN: r259591

gcc/ChangeLog
gcc/reg-stack.c

index 833601a038e2965744652543639c80295c540ac8..d9e5c6f47aec5b3be820de6624ac22dfece2755c 100644 (file)
@@ -1,3 +1,9 @@
+2018-04-24  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/84828
+       * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
+       destination if any_malformed_asm.
+
 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR middle-end/85496
index 73bb4fcf65d9359cce3172aa106192684579aabd..519ea6df75c2345d70c75ad7b26c7a679418763a 100644 (file)
@@ -1105,13 +1105,16 @@ move_for_stack_reg (rtx_insn *insn, stack_ptr regstack, rtx pat)
        }
 
       /* The destination ought to be dead.  */
-      gcc_assert (get_hard_regnum (regstack, dest) < FIRST_STACK_REG);
-
-      replace_reg (psrc, get_hard_regnum (regstack, src));
+      if (get_hard_regnum (regstack, dest) >= FIRST_STACK_REG)
+       gcc_assert (any_malformed_asm);
+      else
+       {
+         replace_reg (psrc, get_hard_regnum (regstack, src));
 
-      regstack->reg[++regstack->top] = REGNO (dest);
-      SET_HARD_REG_BIT (regstack->reg_set, REGNO (dest));
-      replace_reg (pdest, FIRST_STACK_REG);
+         regstack->reg[++regstack->top] = REGNO (dest);
+         SET_HARD_REG_BIT (regstack->reg_set, REGNO (dest));
+         replace_reg (pdest, FIRST_STACK_REG);
+       }
     }
   else if (STACK_REG_P (src))
     {