https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91258
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The message is strange, because it is actually writing 8 bytes into an object with size 4. -fwhole-program is enough to trigger the warning, -flto has the same effect, f inlined into main. And, no matter what, the test really doesn't care about those warnings, so they should just be disabled, it cares whether the UB is reported at runtime. Or add noipa attribute to f, so that it isn't inlined.