[Bug tree-optimization/17506] incorrect warning about non-existant variable

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Sep 15 20:28:00 GMT 2004


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-09-15 20:28 -------
Confirmed. This is caused by inlining:

===================================
inline int foo (int i)
{
    if (i) return 1;
    return 0;
}

void bar()
{
    int j;
    for (; foo(j); ++j) ;
}
===================================

Compiling this with "-O1 -Wall" yields:

PR17506.c: In function `bar':
PR17506.c:3: warning: 'j' is used uninitialized in this function


Btw, Nathan, please compress files that large before attaching them to a PR.


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


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



More information about the Gcc-bugs mailing list