Commit 8749b11f by Uros Bizjak Committed by Uros Bizjak

re PR target/79804 (ICE in print_reg, at config/i386/i386.c:17637)

	PR target/79804
	* config/i386/i386.c (print_reg): Remove assert for disalowed
	regno values, call output_operand_lossage instead.

testsuite/ChangeLog:

	PR target/79804
	* gcc.target/i386/pr79804.c: New test.

From-SVN: r247037
parent 20917336
2017-04-20 Uros Bizjak <ubizjak@gmail.com>
PR target/79804
* config/i386/i386.c (print_reg): Remove assert for disalowed
regno values, call output_operand_lossage instead.
2017-04-20 Uros Bizjak <ubizjak@gmail.com>
PR target/78090
* config/i386/constraints.md (Yc): New register constraint.
* config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
......
......@@ -17650,12 +17650,16 @@ print_reg (rtx x, int code, FILE *file)
regno = REGNO (x);
gcc_assert (regno != ARG_POINTER_REGNUM
&& regno != FRAME_POINTER_REGNUM
&& regno != FPSR_REG
&& regno != FPCR_REG);
if (regno == FLAGS_REG)
if (regno == ARG_POINTER_REGNUM
|| regno == FRAME_POINTER_REGNUM
|| regno == FPSR_REG
|| regno == FPCR_REG)
{
output_operand_lossage
("invalid use of register '%s'", reg_names[regno]);
return;
}
else if (regno == FLAGS_REG)
{
output_operand_lossage ("invalid use of asm flag output");
return;
2017-04-20 Uros Bizjak <ubizjak@gmail.com>
PR target/79804
* gcc.target/i386/pr79804.c: New test.
2017-04-20 Uros Bizjak <ubizjak@gmail.com>
PR target/78090
* gcc.target/i386/conversion-2.c: Remove obsolete test.
......
/* PR target/79804 */
/* { dg-do compile } */
/* { dg-options "" } */
void foo (void)
{
register int r20 asm ("20");
asm volatile ("# %0" : "=r"(r20)); /* { dg-error "invalid use of register" } */
}
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