public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vincent-gcc at vinc17 dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/93432] variable is used uninitialized, but gcc shows no warning
Date: Fri, 25 Feb 2022 15:45:01 +0000	[thread overview]
Message-ID: <bug-93432-4-Nj0zkBzN4M@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-93432-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93432

Vincent Lefèvre <vincent-gcc at vinc17 dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vincent-gcc at vinc17 dot net

--- Comment #6 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
(In reply to Manuel López-Ibáñez from comment #4)
> It warns in gcc 10.1. It may good idea to add this one as a testcase, since
> it seems it got fixed without noticing.

Has this really been fixed, or does it work now just by chance?

This looks like PR18501, where the concerned variable is initialized only at
one place in the loop. Here, "z = 1" is followed by "z=z+1", so that this is
equivalent to "z = 2". But if in the code, I do this change, the warning
disappears (tested with gcc-12 (Debian 12-20220222-1) 12.0.1 20220222
(experimental) [master r12-7325-g2f59f067610] and -O1, -O2, -O3).

  parent reply	other threads:[~2022-02-25 15:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-93432-4@http.gcc.gnu.org/bugzilla/>
2020-06-08 10:21 ` manu at gcc dot gnu.org
2020-07-13 12:10 ` manu at gcc dot gnu.org
2022-02-25 15:45 ` vincent-gcc at vinc17 dot net [this message]
2022-08-31 13:44 ` [Bug tree-optimization/93432] " rguenth at gcc dot gnu.org

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=bug-93432-4-Nj0zkBzN4M@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).