https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120526
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >But clearly tuples[i].str is not NULL. Not to the compiler since it looks like: ... ``` _1 = MEM[(const char * *)_24]; *_15 = 0; size_16 = strtoimax (_1, &end, 10); if (size_16 < 0) goto <bb 4>; [0.73%] else goto <bb 8>; [99.27%] if (_1 == 0B) goto <bb 5>; [100.00%] else goto <bb 6>; [0.00%] <bb 5> [local count: 42423513]: stderr.1_3 = stderr; fprintf (stderr.1_3, "oops %s\n", 0B); ``` strtoimax's first argument not being marked as nonnull. Adding: ``` extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__, nonnull(1))); ``` Fixes the warning and the missed optimization. Let me see why glibc didn't mark strtoimax/strtoumax, etc. as nonnull.