From 8a915b876abe5c82bb3efd0420ceb8d8f3faf988 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 28 Feb 2017 17:24:56 +0100 Subject: [PATCH] re PR target/79729 (ICE in ix86_print_operand, at config/i386/i386.c:18231) 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: r245781 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 3 ++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/pr79729.c | 8 ++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/i386/pr79729.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17acce53557..135f1f6a429 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-02-28 Jakub Jelinek + + PR target/79729 + * config/i386/i386.c (ix86_print_operand) : Replace + gcc_unreachable with output_operand_lossage. + 2017-02-28 Richard Biener PR tree-optimization/79740 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 33ad0f1f0ec..b35b56cbdcf 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -18234,7 +18234,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 a09eb286c97..dec6d0d6c66 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-02-28 Jakub Jelinek + + PR target/79729 + * gcc.target/i386/pr79729.c: New test. + 2017-02-28 Richard Biener PR tree-optimization/79740 diff --git a/gcc/testsuite/gcc.target/i386/pr79729.c b/gcc/testsuite/gcc.target/i386/pr79729.c new file mode 100644 index 00000000000..4e6f500b304 --- /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" } */ +} -- 2.30.2