re PR tree-optimization/89487 (ICE in expand_expr_addr_expr_1, at expr.c:7993)
authorJakub Jelinek <jakub@redhat.com>
Tue, 5 Mar 2019 13:38:59 +0000 (14:38 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 5 Mar 2019 13:38:59 +0000 (14:38 +0100)
PR tree-optimization/89487
* gcc.dg/tree-ssa/pr89487.c: Include ../pr87600.h.
(caml_interprete): Ifdef the whole body out if REG1 or REG2 macros
aren't defined.  Use REG1 instead of "%r15" and REG2 instead of
"%r14".

From-SVN: r269388

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr89487.c

index b9bfece..a019b62 100644 (file)
@@ -1,5 +1,11 @@
 2019-03-05  Jakub Jelinek  <jakub@redhat.com>
 
+       PR tree-optimization/89487
+       * gcc.dg/tree-ssa/pr89487.c: Include ../pr87600.h.
+       (caml_interprete): Ifdef the whole body out if REG1 or REG2 macros
+       aren't defined.  Use REG1 instead of "%r15" and REG2 instead of
+       "%r14".
+
        PR bootstrap/89560
        * g++.dg/other/pr89560.C: New test.
 
index a024196..974d005 100644 (file)
@@ -1,13 +1,18 @@
+/* PR tree-optimization/89487 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-loop-distribution" } */
 
+#include "../pr87600.h"
+
 void
 caml_interprete (void)
 {
-  register int *pc asm("%r15");
-  register int *sp asm("%r14");
+#if defined(REG1) && defined(REG2)
+  register int *pc asm(REG1);
+  register int *sp asm(REG2);
   int i;
 
   for (i = 0; i < 3; ++i)
     *--sp = pc[i];
+#endif
 }