From b72139eac230616ab92636cd0195b44eb235d23f Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 24 Apr 2018 09:40:04 +0200 Subject: [PATCH] re PR target/84828 (ICE in verify_flow_info at gcc/cfghooks.c:265) 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 | 6 ++++++ gcc/reg-stack.c | 15 +++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 833601a038e..d9e5c6f47ae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-04-24 Jakub Jelinek + + 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 PR middle-end/85496 diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 73bb4fcf65d..519ea6df75c 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -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)) { -- 2.30.2