public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] RISC-V: Pull out function call with side effect from gcc_assert.
@ 2023-05-13  6:17 Kito Cheng
  0 siblings, 0 replies; only message in thread
From: Kito Cheng @ 2023-05-13  6:17 UTC (permalink / raw)
  To: gcc-patches, kito.cheng; +Cc: Kito Cheng

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-13  6:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-13  6:17 [committed] RISC-V: Pull out function call with side effect from gcc_assert Kito Cheng

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).