public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] middle-end: Fix unexpected warnings for RISC-V port.
@ 2022-08-23  7:06 juzhe.zhong
  2022-08-23  7:07 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: juzhe.zhong @ 2022-08-23  7:06 UTC (permalink / raw)
  To: gcc-patches; +Cc: rguenther, zhongjuzhe

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-23  7:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-23  7:06 [PATCH] middle-end: Fix unexpected warnings for RISC-V port juzhe.zhong
2022-08-23  7:07 ` Richard Biener

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