This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54833] New: Don't wrap __builtin_free(a) in if (a != NULL)
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 06 Oct 2012 10:13:24 +0000
- Subject: [Bug fortran/54833] New: Don't wrap __builtin_free(a) in if (a != NULL)
- Auto-submitted: auto-generated
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.