https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65182
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|DUPLICATE |---
--- Comment #2 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Ops, I got confused by the testcase and this is not actually a duplicate.
void bar(int *a);
int baz (void);
void
foo(int *b)
{
int a;
if (a) {
*b = 0;
return;
}
bar(&a);
a = baz();
*b = a + 2;
}
In gcc 4.9.2 you need at least -O1 to get a warning, however, it seems that in
GCC 5.0 r220306, -O0 is enough. Thus, I would consider this fixed.