https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83468
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msebor at gcc dot gnu.org
Resolution|--- |FIXED
Status|NEW |RESOLVED
Known to work| |11.0
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
For the very first test case GCC 11 warns at -O0 and -O1 but not at -O2. For
the second test case in comment #0 and for the one in comment #4 it warns at
all three levels. The warning otherwise missing at -O2 in first test case
reappears once the call to test3() is commented out, as one would expect.
Given all the outstanding problems with the warning I consider this resolved.