https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104288
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Pedantically, even in the same bb the non-NULLness applies, but only for the stmt with the non-NULL access (e.g. dereference or strcmp call like in this testcase) or in stmts before it unless there is a stmt that might not return (exit/abort/loop forever), might throw externally (internal throw would mean different bbs), might longjmp out of it etc. or, depending on the recent discussions perhaps volatile accesses. But most passes that use the ranger don't track easily which stmt comes before another one in the same bb (with the exception of say reassoc), so maybe what you talk about is the only thing ranger can do at least for now.