[Bug fortran/54833] Don't wrap __builtin_free(a) in if (a != NULL)
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Oct 7 15:52:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54833
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-07 15:51:51 UTC ---
It depends on what is the probability that the pointer is NULL. If it is
unlikely, then unconditional free is the right choice, if NULL is very likely,
then the test may be less expensive (avoids call including likely PLT slot
overhead and comparison at least).
More information about the Gcc-bugs
mailing list