https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85778
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- It depends on if glibc is adding the nonnull attribute to stat or is it GCC. Also what does the C (and POSIX) standard says about a null pointer being passed as the string to stat.