Commit 3c896da0 by Jakub Jelinek Committed by Jakub Jelinek

re PR inline-asm/84941 (internal compiler error: in reg_overlap_mentioned_p, at…

re PR inline-asm/84941 (internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1870 (reg_overlap_mentioned_p()/match_asm_constraints_1()))

	PR inline-asm/84941
	* function.c (match_asm_constraints_1): Don't do the optimization
	if input isn't a REG, SUBREG, MEM or constant.

	* gcc.dg/pr84941.c: New test.

From-SVN: r258764
parent f2620385
2018-03-22 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/84941
* function.c (match_asm_constraints_1): Don't do the optimization
if input isn't a REG, SUBREG, MEM or constant.
2018-03-22 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/84956
......
......@@ -6662,7 +6662,9 @@ match_asm_constraints_1 (rtx_insn *insn, rtx *p_sets, int noutputs)
if (! REG_P (output)
|| rtx_equal_p (output, input)
|| (GET_MODE (input) != VOIDmode
&& GET_MODE (input) != GET_MODE (output)))
&& GET_MODE (input) != GET_MODE (output))
|| !(REG_P (input) || SUBREG_P (input)
|| MEM_P (input) || CONSTANT_P (input)))
continue;
/* We can't do anything if the output is also used as input,
......
2018-03-22 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/84941
* gcc.dg/pr84941.c: New test.
2018-03-22 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/84956
......
/* PR inline-asm/84941 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
void
foo (void)
{
short *b[1] = { 0 };
asm volatile ("" : "=m,m" (b), "=r,r" (b) : "1,p" (b));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment