[Bug target/85035] nios2: adding -fdelete-null-pointer-checks with -O2 enabled

rvdv at vandewiele dot com gcc-bugzilla@gcc.gnu.org
Fri Mar 23 07:05:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85035

--- Comment #2 from rvdv at vandewiele dot com ---
That would explain why different code is generated when it is removed. 
I assumed it was always on because the "-Q --help=optimizers" output showed it
to be enabled. 

Does this mean the option is known to produce broken code on Nios2-elf? 
For my platform it is not safe to dereference null pointers and no code or data
resides at address zero. 
Therefore I assumed the option would produce better code. 

Or is it the combination of -mno-cache-volatile and
-fdelete-null-pointer-checks that is the problem?


More information about the Gcc-bugs mailing list