public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: juzhe.zhong@rivai.ai
To: gcc-patches@gcc.gnu.org
Cc: rguenther@suse.de, zhongjuzhe <juzhe.zhong@rivai.ai>
Subject: [PATCH] middle-end: Fix unexpected warnings for RISC-V port.
Date: Tue, 23 Aug 2022 15:06:31 +0800	[thread overview]
Message-ID: <20220823070631.154633-1-juzhe.zhong@rivai.ai> (raw)

From: zhongjuzhe <juzhe.zhong@rivai.ai>

gcc/ChangeLog:

        * tree-vect-loop-manip.cc (vect_gen_vector_loop_niters): Simply initialize const_vf to 0.

---
 gcc/tree-vect-loop-manip.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc
index 86d2264054a..c3a24e6c39a 100644
--- a/gcc/tree-vect-loop-manip.cc
+++ b/gcc/tree-vect-loop-manip.cc
@@ -1977,8 +1977,9 @@ vect_gen_vector_loop_niters (loop_vec_info loop_vinfo, tree niters,
     }
   else
     ni_minus_gap = niters;
-
-  unsigned HOST_WIDE_INT const_vf;
+  
+  /* To silence some unexpected warnings, simply initialize to 0. */
+  unsigned HOST_WIDE_INT const_vf = 0;
   if (vf.is_constant (&const_vf)
       && !LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo))
     {
-- 
2.36.1


             reply	other threads:[~2022-08-23  7:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-23  7:06 juzhe.zhong [this message]
2022-08-23  7:07 ` Richard Biener

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=20220823070631.154633-1-juzhe.zhong@rivai.ai \
    --to=juzhe.zhong@rivai.ai \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).