[Bug c/33629] bad code with -O2 if pointer dereference followed by null test

david_albert at axiometric dot com gcc-bugzilla@gcc.gnu.org
Tue Oct 2 18:24:00 GMT 2007



------- Comment #2 from david_albert at axiometric dot com  2007-10-02 18:24 -------
There is a compiler flag to prevent this optimization:
-fno-delete-null-pointer-checks

This flag should be included by default for popular targets such as the ARM7
that do not have hardware memory managers so that gcc does not by default
generate code that silently fails.


-- 

david_albert at axiometric dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david_albert at axiometric
                   |                            |dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33629



More information about the Gcc-bugs mailing list