public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andreas Schwab <schwab@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-2298] middle-end: Fix unexpected warnings for RISC-V port.
Date: Wed, 31 Aug 2022 07:54:41 +0000 (GMT)	[thread overview]
Message-ID: <20220831075441.2FB4B383CCE5@sourceware.org> (raw)

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

                 reply	other threads:[~2022-08-31  7:54 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=20220831075441.2FB4B383CCE5@sourceware.org \
    --to=schwab@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: 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).