From: Oleg Endo Date: Sun, 21 Jan 2018 13:00:51 +0000 (+0000) Subject: re PR target/81485 ([SH] ICE: in sh_find_set_of_reg, at config/sh/sh-protos.h:232) X-Git-Tag: releases/gcc-6.5.0~569 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9a3520deb15ae5ba9b2cfa8dd9ac183561363af;p=thirdparty%2Fgcc.git re PR target/81485 ([SH] ICE: in sh_find_set_of_reg, at config/sh/sh-protos.h:232) PR target/81485 * config/sh/sh-protos.h (sh_find_set_of_reg): Remove assert. From-SVN: r256930 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a2a3a9cbffd3..73b151b10f52 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-01-21 Oleg Endo + + PR target/81485 + * config/sh/sh-protos.h (sh_find_set_of_reg): Remove assert. + 2018-01-21 Oleg Endo Backport from mainline diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h index b08120d37378..68fbfa7f63f1 100644 --- a/gcc/config/sh/sh-protos.h +++ b/gcc/config/sh/sh-protos.h @@ -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; }