https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109269
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Pointers cannot wrap that is once a pointer is a valid pointer, adding anything
to it cannot get you a null pointer.
In this case a large argument to num would cause an for the pointers so gcc
knows num has to be less than LONG_LONG_MAX/sizeof(int).