https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97260
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |4.8.5 Known to fail| |10.2.0, 11.0, 9.3.0 Blocks| |83819 Summary|memcmp of constant string |[9/10/11 regression] memcmp |and local constant array |of constant string and |not folded |local constant array not | |folded --- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> --- It appears that GCC was able to fold such calls until version 4.8. Starting with 4.9 it can't anymore. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83819 [Bug 83819] [meta-bug] missing strlen optimizations