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
This commit is contained in:
Jakub Jelinek 2018-03-06 10:23:36 +01:00 committed by Jakub Jelinek
parent 16ef0a8cb7
commit 155958ddfe
4 changed files with 22 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2018-03-06 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/84683
* reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
assertion failure.
PR tree-optimization/84687
* omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
on new_node->decl.

View File

@ -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);

View File

@ -1,5 +1,8 @@
2018-03-06 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/84683
* g++.dg/ext/pr84683.C: New test.
PR tree-optimization/84687
* gcc.dg/pr84687.c: New test.

View File

@ -0,0 +1,13 @@
// PR inline-asm/84683
// { dg-do compile { target i?86-*-* x86_64-*-* } }
// { dg-options "-O2" }
void
foo (float b, double c)
{
for (int e = 0; e < 2; e++)
{
asm volatile ("" : "+f" (c)); // { dg-error "must specify a single register" }
asm ("" : "+rm" (c = b));
}
}