https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62033
--- Comment #2 from Alan Modra <amodra at gmail dot com> --- I can see where you're coming from Andrew, but what is disconcerting about this is that the _FORTIFY_SOURCE warning is plainly incorrect here. How is one supposed to write a string.h memset macro using __builtin_constant_p() to provide a useful _FORTIFY_SOURCE warning, in the face of this sort of optimisation? Users are going to see this as "__builtin_constant_p() is broken".