public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/19430] Missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
@ 2006-03-10 15:25 ` ciaccio at disi dot unige dot it
  2006-03-10 15:28 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ciaccio at disi dot unige dot it @ 2006-03-10 15:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ciaccio at disi dot unige dot it  2006-03-10 15:25 -------
An even simpler test case of this bug (tested with gcc 3.4.5):

int main( void ) {
        int rc;
        return rc;
        *&rc = 0;
}

> gcc -O -Wall program.c
(more stunning silence)

NOTE: in this example, there is no function invocation inside main().
NOTE: remove the last statement in the program, and the warning will show up.

g.


-- 


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


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

* [Bug middle-end/19430] Missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
  2006-03-10 15:25 ` [Bug middle-end/19430] Missing uninitialized warning ciaccio at disi dot unige dot it
@ 2006-03-10 15:28 ` pinskia at gcc dot gnu dot org
  2006-03-10 15:31 ` dnovillo at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-10 15:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2006-03-10 15:28 -------
(In reply to comment #7)
> An even simpler test case of this bug (tested with gcc 3.4.5):
That works correctly in 4.0.0 and above.


-- 


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


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

* [Bug middle-end/19430] Missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
  2006-03-10 15:25 ` [Bug middle-end/19430] Missing uninitialized warning ciaccio at disi dot unige dot it
  2006-03-10 15:28 ` pinskia at gcc dot gnu dot org
@ 2006-03-10 15:31 ` dnovillo at gcc dot gnu dot org
  2006-03-10 15:37 ` mike at codeweavers dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2006-03-10 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dnovillo at gcc dot gnu dot org  2006-03-10 15:31 -------

Not going to work on this problem any time soon.


-- 

dnovillo at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|dnovillo at gcc dot gnu dot |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug middle-end/19430] Missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-03-10 15:31 ` dnovillo at gcc dot gnu dot org
@ 2006-03-10 15:37 ` mike at codeweavers dot com
  2006-09-25 22:44 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: mike at codeweavers dot com @ 2006-03-10 15:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from mike at codeweavers dot com  2006-03-10 15:37 -------
Can I bribe you to work on it by fixing a Wine bug in exchange? :)


-- 


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


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

* [Bug middle-end/19430] Missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2006-03-10 15:37 ` mike at codeweavers dot com
@ 2006-09-25 22:44 ` pinskia at gcc dot gnu dot org
  2007-03-02 23:36 ` skunk at iskunk dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-25 22:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2006-09-25 22:44 -------
*** Bug 29227 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |debian-gcc at lists dot
                   |                            |debian dot org


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


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

* [Bug middle-end/19430] Missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2006-09-25 22:44 ` pinskia at gcc dot gnu dot org
@ 2007-03-02 23:36 ` skunk at iskunk dot org
  2007-03-20 17:43 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: skunk at iskunk dot org @ 2007-03-02 23:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from skunk at iskunk dot org  2007-03-02 23:36 -------
Here's my minimal test case. Compile with "-O3 -Wall -c":

#include <stdio.h>

void frob(int *pi);

int main(void)
{
    int i;
    printf("i = %d\n", i);
    frob(&i);

    return 0;
}

No warning from 4.0.3 nor 4.1.2....


-- 


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


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

* [Bug middle-end/19430] Missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2007-03-02 23:36 ` skunk at iskunk dot org
@ 2007-03-20 17:43 ` pinskia at gcc dot gnu dot org
  2007-08-15 15:36 ` [Bug middle-end/19430] V_MAY_DEF (taking address of var) causes missing " manu at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-20 17:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from pinskia at gcc dot gnu dot org  2007-03-20 17:43 -------
*** Bug 31284 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org


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


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

* [Bug middle-end/19430] V_MAY_DEF (taking address of var) causes missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2007-03-20 17:43 ` pinskia at gcc dot gnu dot org
@ 2007-08-15 15:36 ` manu at gcc dot gnu dot org
  2007-08-17  9:17 ` manu at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-08-15 15:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from manu at gcc dot gnu dot org  2007-08-15 15:36 -------
Trying to improve the summary to help spot duplicates.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu dot org
            Summary|Missing uninitialized       |V_MAY_DEF (taking address of
                   |warning                     |var) causes missing
                   |                            |uninitialized warning


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


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

* [Bug middle-end/19430] V_MAY_DEF (taking address of var) causes missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2007-08-15 15:36 ` [Bug middle-end/19430] V_MAY_DEF (taking address of var) causes missing " 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
  10 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu dot org @ 2007-08-17  9:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from manu at gcc dot gnu dot org  2007-08-17 09:17 -------
This seems to me a duplicate of PR179. I am going to add a dependency to
remember to check this PR when PR179 gets fixed.


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |179


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


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

* [Bug middle-end/19430] V_MAY_DEF (taking address of var) causes missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  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
  10 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu dot org @ 2008-08-20 22:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from manu at gcc dot gnu dot org  2008-08-20 22:31 -------
All testcases except the one in the original description were actually
duplicates of PR179 and are thusly fixed. 

The original testcase deals with PHI ops which is a completely different beast.
I added it XFAILED as gcc.dg/uninit-pr19430.c but I doubt it will get magically
fixed, so suggestions/patches welcome.


-- 


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


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

* [Bug middle-end/19430] V_MAY_DEF (taking address of var) causes missing uninitialized warning
       [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2008-08-20 22:32 ` manu at gcc dot gnu dot org
@ 2009-11-19 12:01 ` manu at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: manu at gcc dot gnu dot org @ 2009-11-19 12:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from manu at gcc dot gnu dot org  2009-11-19 12:00 -------
*** Bug 42079 has been marked as a duplicate of this bug. ***


-- 

manu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m dot b dot lankhorst at
                   |                            |gmail dot com


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


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

* [Bug middle-end/19430] V_MAY_DEF (taking address of var) causes missing uninitialized warning
       [not found] <bug-19430-4@http.gcc.gnu.org/bugzilla/>
@ 2013-11-21  3:11 ` vincent-gcc at vinc17 dot net
  0 siblings, 0 replies; 12+ messages in thread
From: vincent-gcc at vinc17 dot net @ 2013-11-21  3:11 UTC (permalink / raw)
  To: gcc-bugs

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;
   ^


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

end of thread, other threads:[~2013-11-21  3:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19430-9033@http.gcc.gnu.org/bugzilla/>
2006-03-10 15:25 ` [Bug middle-end/19430] Missing uninitialized warning ciaccio at disi dot unige dot it
2006-03-10 15:28 ` pinskia at gcc dot gnu dot org
2006-03-10 15:31 ` dnovillo at gcc dot gnu dot org
2006-03-10 15:37 ` mike at codeweavers dot com
2006-09-25 22:44 ` pinskia at gcc dot gnu dot org
2007-03-02 23:36 ` skunk at iskunk dot org
2007-03-20 17:43 ` pinskia at gcc dot gnu dot org
2007-08-15 15:36 ` [Bug middle-end/19430] V_MAY_DEF (taking address of var) causes missing " 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
     [not found] <bug-19430-4@http.gcc.gnu.org/bugzilla/>
2013-11-21  3:11 ` vincent-gcc at vinc17 dot net

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