aboutsummaryrefslogtreecommitdiff
path: root/gcc/reg-stack.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-03-06 10:23:36 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-03-06 10:23:36 +0100
commit155958ddfeaf5b657357440bf3127243c61cc951 (patch)
tree4201cc602172f62726bb625852f2daa36ccdb74e /gcc/reg-stack.c
parent16ef0a8cb7c913a09bfe5487688d45d42dae26ac (diff)
downloadgcc-155958ddfeaf5b657357440bf3127243c61cc951.zip
gcc-155958ddfeaf5b657357440bf3127243c61cc951.tar.gz
gcc-155958ddfeaf5b657357440bf3127243c61cc951.tar.bz2
re PR inline-asm/84683 (internal compiler error: in move_for_stack_reg, at reg-stack.c:1173)
PR inline-asm/84683 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid assertion failure. * g++.dg/ext/pr84683.C: New test. From-SVN: r258273
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r--gcc/reg-stack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 9474896..82feb5d 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -1170,7 +1170,8 @@ move_for_stack_reg (rtx_insn *insn, stack_ptr regstack, rtx pat)
&& XINT (SET_SRC (XVECEXP (pat, 0, 1)), 1) == UNSPEC_TAN)
emit_swap_insn (insn, regstack, dest);
else
- gcc_assert (get_hard_regnum (regstack, dest) < FIRST_STACK_REG);
+ gcc_assert (get_hard_regnum (regstack, dest) < FIRST_STACK_REG
+ || any_malformed_asm);
gcc_assert (regstack->top < REG_STACK_SIZE);