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] New: Don't wrap __builtin_free(a) in if (a != NULL)


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.


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