On 08/06/2018 07:48 AM, Jeff Law wrote:
> 
> 
> forget_old_reloads_1 can be called with NULL_RTX for SETTER which causes
> a segfault in the assert that SETTER is not a CLOBBER_HIGH expression
> (see the call from within reload_as_needed)
> 
> 
>  forget_old_reloads_1 (XEXP (in_reg, 0), NULL_RTX, NULL);
> 
> 
> Clearly this only happens on reload targets.  Verified this fixed the
> segfault my tester hit on c6x.
> 
> Installing as obvious.
> 
> JEff
> 
Opps.  With patch this time...

Jeff


diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 78e51d29f73..c17a55ce837 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2018-08-06  Jeff Law  <l...@redhat.com>
+
+       * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
+       assert.
+
 2018-08-06  Jozef Lawrynowicz  <joze...@mittosystems.com>
 
        PR target/86662
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 8e15160c6ad..3c0c9ff982f 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -4931,7 +4931,7 @@ forget_old_reloads_1 (rtx x, const_rtx setter,
     return;
 
   /* CLOBBER_HIGH is only supported for LRA.  */
-  gcc_assert (GET_CODE (setter) != CLOBBER_HIGH);
+  gcc_assert (setter == NULL_RTX || GET_CODE (setter) != CLOBBER_HIGH);
 
   regno = REGNO (x);
 

Reply via email to