diff mbox series

[committed] Fix tree-ssa/asm-2.c on the v850

Message ID 5cc1f6a2-9066-07c7-902d-e44527d62000@redhat.com
State New
Headers show
Series [committed] Fix tree-ssa/asm-2.c on the v850 | expand

Commit Message

Jeff Law July 6, 2018, 4:18 a.m. UTC
r0 on the v850 is a hardwired 0 value.  For reasons unknown I exposed it
in the register file.

This runs afoul of tree-ssa/asm-2.c which has a local variable
explicitly assigned to register 0.  This naturally blows up.

The fix is trivial, use a different register like other ports do.

Installing on the trunk.

Jeff
diff mbox series

Patch

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8496a38c291..4952b18983f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@ 
+2018-07-05  Jeff Law  <law@redhat.com>
+
+	* gcc.dg/tree-ssa/asm-2.c (REGISTER): Override for v850 too.
+
 2018-07-05  Paul Thomas  <pault@gcc.gnu.org>
 
 	PR fortran/86408
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c b/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c
index 4dc4a9d6c6a..00c3079181d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c
@@ -1,7 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -fdump-tree-optimized" } */
 
-#ifdef __hppa__
+#if defined(__hppa__) || defined(__v850__)
 #define REGISTER "1"
 #else
 #ifdef __moxie__