re PR target/79729 (ICE in ix86_print_operand, at config/i386/i386.c:18231)
authorJakub Jelinek <jakub@redhat.com>
Tue, 28 Feb 2017 16:24:56 +0000 (17:24 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 28 Feb 2017 16:24:56 +0000 (17:24 +0100)
PR target/79729
* config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
gcc_unreachable with output_operand_lossage.

* gcc.target/i386/pr79729.c: New test.

From-SVN: r245781

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr79729.c [new file with mode: 0644]

index 17acce53557e9e1e71a33a4b3304c233b6283cf4..135f1f6a429918fe0a031c57670db11e90cf8aae 100644 (file)
@@ -1,3 +1,9 @@
+2017-02-28  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/79729
+       * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
+       gcc_unreachable with output_operand_lossage.
+
 2017-02-28  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/79740
index 33ad0f1f0ecf6681f91c58e34ed12dbbc4f74a5a..b35b56cbdcf2470ee50aeb02f3941f092d3fbd1b 100644 (file)
@@ -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)
index a09eb286c97d2fde30cc280a5d6b824b094b8273..dec6d0d6c664d71eb6f1eb974bbad1d67d106bd2 100644 (file)
@@ -1,3 +1,8 @@
+2017-02-28  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/79729
+       * gcc.target/i386/pr79729.c: New test.
+
 2017-02-28  Richard Biener  <rguenther@suse.de>
 
        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 (file)
index 0000000..4e6f500
--- /dev/null
@@ -0,0 +1,8 @@
+/* PR target/79729 */
+/* { dg-do compile } */
+
+void
+foo (int x)
+{
+  __asm__ volatile ("# %R0" : : "n" (129));    /* { dg-error "invalid operand code" } */
+}