On Sat, 12 Sep 2020, William Tambe via Gcc-help wrote:
Using -fno-delete-null-pointer-checks helps.
Is there a way to make it permanent in the GCC source such that
providing that option is not needed ?
$ grep -R delete-null-pointer-checks gcc/config
gcc/config/nios2/elf.h:/* Default -fdelete-null-pointer-checks to off, to prevent the compiler
gcc/config/cr16/cr16.c: /* Disable -fdelete-null-pointer-checks option for CR16 target.
TARGET_OPTION_OVERRIDE seems to be the way if you want to disable it for
some specific target. If you want to change the default for all targets,
you could edit common.opt instead.
--
Marc Glisse