https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91699
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=80545 --- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> --- -Wstringop-overflow is only enabled for the C family plus LTO and with pr80545 resolved should now be disabled for Fortran, so something in the command line option handling is still not working right. My guess is the LTO setting in the warning entry in gcc/c-family/c.opt is behind it: Wstringop-overflow= C ObjC C++ LTO ObjC++ Joined RejectNegative UInteger Var(warn_stringop_overflow) Init(2) Warning LangEnabledBy(C ObjC C++ LTO ObjC++, Wall, 2, 0) IntegerRange(0, 4) The LTO handling of late warning options aside, I also suspect the warning code itself isn't dealing with the "special" MEM_REFs emitted for Fortran arrays quite right. I recently fixed a -Warray-bounds false positive for Fortran (pr91584) and it wouldn't surprise me if the code -Wstringop-overflow had a similar bug.