]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/81485 ([SH] ICE: in sh_find_set_of_reg, at config/sh/sh-protos.h:232)
authorOleg Endo <olegendo@gcc.gnu.org>
Sun, 21 Jan 2018 13:00:51 +0000 (13:00 +0000)
committerOleg Endo <olegendo@gcc.gnu.org>
Sun, 21 Jan 2018 13:00:51 +0000 (13:00 +0000)
PR target/81485
* config/sh/sh-protos.h (sh_find_set_of_reg): Remove assert.

From-SVN: r256930

gcc/ChangeLog
gcc/config/sh/sh-protos.h

index a2a3a9cbffd34f9531d6d7049e7825e3a9e852fa..73b151b10f529eb2d7477245b0fa5ea378ef28e2 100644 (file)
@@ -1,3 +1,8 @@
+2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
+
+       PR target/81485
+       * config/sh/sh-protos.h (sh_find_set_of_reg): Remove assert.
+
 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
 
        Backport from mainline
index b08120d373787b49f4afc8b56845bf11bb73dc19..68fbfa7f63f189fb673c75bac90a5d6b271172cb 100644 (file)
@@ -228,9 +228,13 @@ sh_find_set_of_reg (rtx reg, rtx_insn* insn, F stepfunc,
        }
     }
 
-  if (result.set_src != NULL)
-    gcc_assert (result.insn != NULL && result.set_rtx != NULL);
-
+  /* If the searched reg is found inside a (mem (post_inc:SI (reg))), set_of
+     will return NULL and set_rtx will be NULL.
+     In this case report a 'not found'.  result.insn will always be non-null
+     at this point, so no need to check it.  */
+  if (result.set_src != NULL && result.set_rtx == NULL)
+    result.set_src = NULL;
   return result;
 }