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

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jun 26 15:40:00 GMT 2009



------- Comment #4 from rguenth at gcc dot gnu dot org  2009-06-26 15:39 -------
And we want to optimize

void *malloc(__SIZE_TYPE__);
void free(void*);
void abort(void);
int f(void)
{
  char *i = malloc(1);
  if (i == (void *)0)
    abort ();
  *i = 1;
  free (i);
}

the same (removing the check and the abort() call).

Which asks for doing the task all at once.  Somewhere.


-- 


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



More information about the Gcc-bugs mailing list