[Bug middle-end/54544] Option -Wuninitialized does not work as documented with volatile
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Sep 13 21:02:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54544
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |manu at gcc dot gnu.org
Resolution|--- |DUPLICATE
--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
This has nothing to do with volatile, as this reduced testcase shows:
int fct2(void);
int fct(int *p);
static int foo(int * p )
{
do {
if ( *p )
{
return fct( p );
}
}
while ( fct2() );
return 0;
}
int bar()
{
int i;
return foo( &i );
}
The issue here is that the testcase creates virtual phis
# .MEM_9 = PHI <.MEM_1(D)(2), .MEM_12(7)>
and this is not handled by the uninit pass yet.
*** This bug has been marked as a duplicate of bug 19430 ***
More information about the Gcc-bugs
mailing list