public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/13127] New: [tree-ssa] Inlining causes spurious "might be used uninitialized" warnings
@ 2003-11-19 15:05 steven at gcc dot gnu dot org
  2003-11-20 16:26 ` [Bug middle-end/13127] " reichelt at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-11-19 15:05 UTC (permalink / raw)
  To: gcc-bugs

While looking at Bug 13000 I noticed this bug.  Consider: 
 
static int foo (int a) { } 
int main (void) { return foo (0); } 
 
Compile this with "-O2 -Wall" and you can see that when finalizing 
`main' (after inlining foo of course), we produce this strange warning: 
 
t.i:2: warning: '({anonymous})' might be used uninitialized in this function 
 
Wtf  :-) 
 
Of course this is a regression from mainline and older GCCs. 
 
 
-------------- 
$ cat t.i 
static int foo (int a) { } 
int main (void) { return foo (0); } 
$ cc1 --version 
GNU C version 3.5-tree-ssa 20031119 (merged 20031111) (i686-pc-linux-gnu) 
        compiled by GNU C version 3.5-tree-ssa 20031119 (merged 20031111). 
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 
$ cc1 -O -Wall t.i 
 foo 
t.i: In function `foo': 
t.i:1: warning: control reaches end of non-void function 
 main 
 
$ cc1 -O2 -Wall t.i 
 main 
t.i: In function `main': 
t.i:2: warning: '({anonymous})' might be used uninitialized in this function

-- 
           Summary: [tree-ssa] Inlining causes spurious "might be used
                    uninitialized" warnings
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot
                    org
  GCC host triplet: any
 BugsThisDependsOn: 13000


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


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

end of thread, other threads:[~2005-01-17 17:17 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-19 15:05 [Bug middle-end/13127] New: [tree-ssa] Inlining causes spurious "might be used uninitialized" warnings steven at gcc dot gnu dot org
2003-11-20 16:26 ` [Bug middle-end/13127] " reichelt at gcc dot gnu dot org
2003-11-20 16:31 ` bangerth at dealii dot org
2003-11-21 23:28 ` reichelt at gcc dot gnu dot org
2004-02-06  6:17 ` pinskia at gcc dot gnu dot org
2004-02-06  7:12 ` pinskia at gcc dot gnu dot org
2004-02-06 15:23 ` pinskia at gcc dot gnu dot org
2004-02-06 15:42 ` pinskia at gcc dot gnu dot org
2004-02-06 21:30 ` cvs-commit at gcc dot gnu dot org
2004-02-06 21:31 ` pinskia at gcc dot gnu dot org
2004-08-18  7:34 ` rth at gcc dot gnu dot org
2004-08-18  7:35 ` rth at gcc dot gnu dot org
2004-08-18 14:53 ` pinskia at gcc dot gnu dot org
2004-09-24  4:11 ` [Bug middle-end/13127] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-12-20  1:02 ` steven at gcc dot gnu dot org
2005-01-09  0:48 ` pinskia at gcc dot gnu dot org
2005-01-17  3:01 ` pinskia at gcc dot gnu dot org
2005-01-17 17:14 ` cvs-commit at gcc dot gnu dot org
2005-01-17 17:14 ` ian at airs dot com
2005-01-17 17:17 ` cvs-commit at gcc dot gnu dot org

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