From: Jakub Jelinek Date: Tue, 30 May 2017 08:06:28 +0000 (+0200) Subject: backport: re PR target/79729 (ICE in ix86_print_operand, at config/i386/i386.c:18231) X-Git-Tag: releases/gcc-5.5.0~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62b3732dd5d251d9e972568beb2e3051718114d0;p=thirdparty%2Fgcc.git backport: re PR target/79729 (ICE in ix86_print_operand, at config/i386/i386.c:18231) Backported from mainline 2017-02-28 Jakub Jelinek PR target/79729 * config/i386/i386.c (ix86_print_operand) : Replace gcc_unreachable with output_operand_lossage. * gcc.target/i386/pr79729.c: New test. From-SVN: r248652 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 29359b73d0d7..ad692eb55f35 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2017-05-30 Jakub Jelinek Backported from mainline + 2017-02-28 Jakub Jelinek + + PR target/79729 + * config/i386/i386.c (ix86_print_operand) : Replace + gcc_unreachable with output_operand_lossage. + 2017-02-25 Jakub Jelinek PR middle-end/79396 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index bdd91dc6d170..0fd46a7f2175 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -15955,7 +15955,8 @@ ix86_print_operand (FILE *file, rtx x, int code) fputs ("{rz-sae}", file); break; default: - gcc_unreachable (); + output_operand_lossage ("operand is not a specific integer, " + "invalid operand code 'R'"); } if (ASSEMBLER_DIALECT == ASM_ATT) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 06771821c0d3..5a0617d211ad 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,11 @@ 2017-05-30 Jakub Jelinek Backported from mainline + 2017-02-28 Jakub Jelinek + + PR target/79729 + * gcc.target/i386/pr79729.c: New test. + 2017-02-25 Jakub Jelinek PR middle-end/79396 diff --git a/gcc/testsuite/gcc.target/i386/pr79729.c b/gcc/testsuite/gcc.target/i386/pr79729.c new file mode 100644 index 000000000000..4e6f500b3048 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr79729.c @@ -0,0 +1,8 @@ +/* PR target/79729 */ +/* { dg-do compile } */ + +void +foo (int x) +{ + __asm__ volatile ("# %R0" : : "n" (129)); /* { dg-error "invalid operand code" } */ +}