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 middle-end/19430] V_MAY_DEF (taking address of var) causes missing uninitialized warning
Date: Thu, 21 Nov 2013 03:11:00 -0000	[thread overview]
Message-ID: <bug-19430-4-ub9wFKiZYY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-19430-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19430

--- Comment #18 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> ---
This seems to be fixed in the trunk.
>From gcc-bugs-return-435307-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Nov 21 03:12:33 2013
Return-Path: <gcc-bugs-return-435307-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 17483 invoked by alias); 21 Nov 2013 03:12:32 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 17433 invoked by uid 48); 21 Nov 2013 03:12:29 -0000
From: "vincent-gcc at vinc17 dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/59225] New: missing maybe uninitialized warning following single if
Date: Thu, 21 Nov 2013 03:12:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: minor
X-Bugzilla-Who: vincent-gcc at vinc17 dot net
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-59225-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg02084.txt.bz2
Content-length: 1009

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY225

            Bug ID: 59225
           Summary: missing maybe uninitialized warning following single
                    if
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vincent-gcc at vinc17 dot net

With:
* gcc-4.8 (Debian 4.8.2-5) 4.8.2
* gcc (Debian 20131021-1) 4.9.0 20131021 (experimental) [trunk revision 203899]

xvii:~> cat tst1.c
int foo (int x)
{
  int y;
  if (x == 0)
    y = 1;
  return y;
}

"gcc-snapshot -O2 -Wuninitialized -c tst1.c" doesn't emit any warning.

If I change the code to:

xvii:~> cat tst2.c
int foo (int x)
{
  int y;
  if (x == 0)
    y = 1;
  else if (x == 1)
    y = 2;
  return y;
}

I get the following warning as expected:

tst2.c:8:3: warning: 'y' may be used uninitialized in this function
[-Wmaybe-uninitialized]
   return y;
   ^


       reply	other threads:[~2013-11-21  3:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-19430-4@http.gcc.gnu.org/bugzilla/>
2013-11-21  3:11 ` vincent-gcc at vinc17 dot net [this message]
2013-11-21 12:16 ` [Bug middle-end/19430] taking address of a var " rguenth at gcc dot gnu.org
2013-11-21 18:31 ` manu at gcc dot gnu.org
2013-11-21 23:57 ` vincent-gcc at vinc17 dot net
2020-10-27 17:05 ` [Bug middle-end/19430] taking address of a var causes missing uninitialized warning (virtual PHI with MEM) msebor at gcc dot gnu.org
2021-04-01  0:23 ` msebor at gcc dot gnu.org
2022-08-29 13:08 ` rguenth at gcc dot gnu.org
2022-08-29 13:16 ` rguenth at gcc dot gnu.org
     [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
2007-08-15 15:36 ` [Bug middle-end/19430] V_MAY_DEF (taking address of var) causes missing uninitialized warning manu at gcc dot gnu dot org
2007-08-17  9:17 ` manu at gcc dot gnu dot org
2008-08-20 22:32 ` manu at gcc dot gnu dot org
2009-11-19 12:01 ` manu at gcc dot gnu dot 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-19430-4-ub9wFKiZYY@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).