https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62307
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The reason for implied -fno-delete-null-pointer-checks for -fsanitize=null, -fsanitize=nonnull or -fsanitize=returns-nonnull is that the checks themselves would be optimized away. In theory we could implement those say by hiding them from the optimizers through GIMPLE_ASM or similar, but we are there on a thin ice, I feel trying to optimize the various -fsanitize=undefined checks too hard risks that we optimize away some checks that actually should be performed. Say from VRP we find out that in valid program something shouldn't have out of bounds value, but in invalid program it very well could have, and the checks are meant to report invalid programs.