https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77298
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The warning for proper behavior needs the function being gimplified and in SSA form, unless the FE start doing that themselves, otherwise it can't generally determine if an argument is known to be non-NULL or has been reassigned afterwards and no guarantees are known about it. Of course, this is quite a special case, because this isn't a parameter one can change in the function in any way, so theoretically we could warn for this in the FE.