https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66090
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Andrew from comment #7) > IMHO > > "So no GCC bug, just wrongly assuming pointers can't become null pointers if > they were not null pointers." > > Nevertheless, that is no reason to generate an INFINITY LOOP, which will be > cleaned all the memory, including the NULL address. But undefined behavior can do anything. And this is just undefined behavior.