public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jeff Law <law@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Fix one warning of maybe-uninitialized in riscv-vsetvl.cc Date: Fri, 14 Jul 2023 02:46:34 +0000 (GMT) [thread overview] Message-ID: <20230714024634.59274385841A@sourceware.org> (raw) https://gcc.gnu.org/g:251a8f8357ca223a99f1fcafb61ac3d2d6886c54 commit 251a8f8357ca223a99f1fcafb61ac3d2d6886c54 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 42cc6f29f26..971c3f90742 100644 --- a/gcc/config/riscv/riscv-vsetvl.cc +++ b/gcc/config/riscv/riscv-vsetvl.cc @@ -4343,7 +4343,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 ();
next reply other threads:[~2023-07-14 2:46 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-14 2:46 Jeff Law [this message] -- strict thread matches above, loose matches on Subject: below -- 2023-06-19 11:41 Jeff Law
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=20230714024634.59274385841A@sourceware.org \ --to=law@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).