public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54833] New: Don't wrap __builtin_free(a) in if (a != NULL)
@ 2012-10-06 10:13 tkoenig at gcc dot gnu.org
  2012-10-06 10:13 ` [Bug fortran/54833] " tkoenig at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2012-10-06 10:13 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54833
           Summary: Don't wrap __builtin_free(a) in if (a != NULL)
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: tkoenig@gcc.gnu.org
        ReportedBy: tkoenig@gcc.gnu.org


The Fortran front end at the moment generates many calls
to __builtin_free with

      if (a.data != 0B)
        {
          __builtin_free ((void *) a.data);
        }
      a.data = 0B;

This is not necessary, because free(NULL) is well-defined no-op.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-31 10:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-06 10:13 [Bug fortran/54833] New: Don't wrap __builtin_free(a) in if (a != NULL) tkoenig at gcc dot gnu.org
2012-10-06 10:13 ` [Bug fortran/54833] " tkoenig at gcc dot gnu.org
2012-10-07 15:52 ` jakub at gcc dot gnu.org
2015-08-31 10:55 ` fxcoudert at gcc dot gnu.org
2015-08-31 10:55 ` fxcoudert at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).