public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kito Cheng <kito.cheng@sifive.com>
To: gcc-patches@gcc.gnu.org, kito.cheng@gmail.com
Cc: Kito Cheng <kito.cheng@sifive.com>
Subject: [committed] RISC-V: Pull out function call with side effect from gcc_assert.
Date: Sat, 13 May 2023 14:17:19 +0800	[thread overview]
Message-ID: <20230513061719.63705-1-kito.cheng@sifive.com> (raw)

It will broken when release mode.

gcc/ChangeLog:

	* config/riscv/riscv-vsetvl.cc (pass_vsetvl::cleanup_insns):
	Pull out function call from the gcc_assert.
---
 gcc/config/riscv/riscv-vsetvl.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc
index 5c4b349dd9db..9847d649d1db 100644
--- a/gcc/config/riscv/riscv-vsetvl.cc
+++ b/gcc/config/riscv/riscv-vsetvl.cc
@@ -4307,7 +4307,8 @@ pass_vsetvl::cleanup_insns (void) const
 		    = simplify_replace_rtx (SET_SRC (set), avl, const0_rtx);
 		  pat = gen_rtx_SET (SET_DEST (set), src);
 		}
-	      gcc_assert (change_insn (crtl->ssa, change, insn, pat));
+	      bool ok = change_insn (crtl->ssa, change, insn, pat);
+	      gcc_assert (ok);
 	    }
 	}
     }
-- 
2.39.2


                 reply	other threads:[~2023-05-13  6:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230513061719.63705-1-kito.cheng@sifive.com \
    --to=kito.cheng@sifive.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kito.cheng@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).