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

2007-10-03 Thread rask at gcc dot gnu dot org
--- Comment #3 from rask at gcc dot gnu dot org 2007-10-03 22:13 --- You could open a request for a warning when a null pointer check is optimized away after dereferencing the pointer. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33629

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

2007-10-02 Thread david_albert at axiometric dot com
--- 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 t

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

2007-10-02 Thread rask at gcc dot gnu dot org
--- Comment #1 from rask at gcc dot gnu dot org 2007-10-02 18:08 --- This behaviour is as documented. http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html -- rask at gcc dot gnu dot org changed: What|Removed |Added --