https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94867
--- Comment #4 from Vadim Zeitlin <vz-gcc at zeitlins dot org> --- (In reply to Martin Liška from comment #3) > It's gone since r10-3311-gff6686d2e5f797d6. This commit is included in releases/gcc-10.1.0 tag, but I still see the warning with the provided example when using g++ 10.1 with -O, as mentioned in comment #2, even though I indeed don't see it with -O2 any longer.