From: Kito Cheng Date: Sat, 13 May 2023 06:10:53 +0000 (+0800) Subject: RISC-V: Pull out function call with side effect from gcc_assert. X-Git-Tag: basepoints/gcc-15~9333 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d339ce8d002920fe8f1c968a04bb8b0c2580b0e;p=thirdparty%2Fgcc.git RISC-V: Pull out function call with side effect from gcc_assert. 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. --- 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); } } }