public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-2298] middle-end: Fix unexpected warnings for RISC-V port.
@ 2022-08-31  7:54 Andreas Schwab
  0 siblings, 0 replies; only message in thread
From: Andreas Schwab @ 2022-08-31  7:54 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:a99b53f7e1860b96b67f069eb7965fcbac6594f6

commit r13-2298-ga99b53f7e1860b96b67f069eb7965fcbac6594f6
Author: zhongjuzhe <juzhe.zhong@rivai.ai>
Date:   Tue Aug 23 15:06:31 2022 +0800

    middle-end: Fix unexpected warnings for RISC-V port.
    
    gcc/ChangeLog:
    
            * tree-vect-loop-manip.cc (vect_gen_vector_loop_niters): Simply
            initialize const_vf to 0.

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

diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc
index 86d2264054a..48a5f391d7f 100644
--- a/gcc/tree-vect-loop-manip.cc
+++ b/gcc/tree-vect-loop-manip.cc
@@ -1978,7 +1978,8 @@ 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))
     {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-31  7:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31  7:54 [gcc r13-2298] middle-end: Fix unexpected warnings for RISC-V port Andreas Schwab

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