[Bug tree-optimization/19831] New: Missing DSE/malloc/free optimization

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Feb 9 07:20:00 GMT 2005


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



More information about the Gcc-bugs mailing list