public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pan Li <panli@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-1884] RISC-V: Fix one warning of maybe-uninitialized in riscv-vsetvl.cc Date: Fri, 16 Jun 2023 11:48:35 +0000 (GMT) [thread overview] Message-ID: <20230616114835.0DC5C3858D35@sourceware.org> (raw) https://gcc.gnu.org/g:27612ce352921d74086102d9ad4d3e011923f837 commit r14-1884-g27612ce352921d74086102d9ad4d3e011923f837 Author: Pan Li <pan2.li@intel.com> Date: Fri Jun 16 19:31:15 2023 +0800 RISC-V: Fix one warning of maybe-uninitialized in riscv-vsetvl.cc This patch would like to fix one maybe-uninitialized warning. Aka: riscv-vsetvl.cc:4354:3: error: 'vsetvl_rinsn' may be used uninitialized [-Werror=maybe-uninitialized] Signed-off-by: Pan Li <pan2.li@intel.com> gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pass_vsetvl::global_eliminate_vsetvl_insn): Initialize var by NULL. Diff: --- gcc/config/riscv/riscv-vsetvl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index cae9be0d928..7066dea3d14 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -4340,7 +4340,7 @@ get_first_vsetvl_before_rvv_insns (basic_block cfg_bb) bool pass_vsetvl::global_eliminate_vsetvl_insn (const bb_info *bb) const { - rtx_insn *vsetvl_rinsn; + rtx_insn *vsetvl_rinsn = NULL; vector_insn_info dem = vector_insn_info (); const auto &block_info = get_block_info (bb); basic_block cfg_bb = bb->cfg_bb ();
reply other threads:[~2023-06-16 11:48 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=20230616114835.0DC5C3858D35@sourceware.org \ --to=panli@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /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: linkBe 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).