This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/54833] Don't wrap __builtin_free(a) in if (a != NULL)


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]