This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/19831] New: Missing DSE/malloc/free optimization
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Feb 2005 21:35:18 -0000
- Subject: [Bug tree-optimization/19831] New: Missing DSE/malloc/free optimization
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following function really should be compiled to an empty function (DSE should first remove the
store and then free of a malloc with no change inbetween and we should remove both calls).
void *malloc(__SIZE_TYPE__);
void free(void*);
int f(void)
{
char *i = malloc(1);
*i = 1;
free (i);
}
This is something which is useful when we want to much higer level optimizations.
--
Summary: Missing DSE/malloc/free optimization
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19831