Created attachment 48951 [details]
minimal code for missing maybe-uninitialized warning
There are cases where GCC should warn about maybe-uninitialized variables but doesn't.
In the attached minimal code, the `goto` may prevent the eth.pktio to be initialized, but GCC doesn't warn about it.
Weirdly enough, if the pktio_read() call is uncommented, GCC warns that eth.pktio may be uninitialized.
Of course the fix is to initialize eth.pktio before the goto.
I'm pretty sure this is PR18501.
pktio_read() creates a PHI node and prevents CCP deleting the undefined value.
*** This bug has been marked as a duplicate of bug 18501 ***
I just tried with GCC 9.3 and the bug is still present.
(In reply to Salamandar from comment #2)
> I just tried with GCC 9.3 and the bug is still present.
Yes, PR18501 is still open (and it won't be fixed anytime soon, it is too difficult).