https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58920
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- maybe have the front-end emit (if -fdelete-null-pointer-checks is on), if (ref == NULL) __builtin_unreachable(); This might most cases, how many I don't know.