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

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 7 15:05:00 GMT 2011


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

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-09-07 15:04:17 UTC ---
Hm, and for invalid code like

int main()
{
  int *p = __builtin_malloc (sizeof (int) * 4);
  *p++ = 4;
  *p++ = 8;
  __builtin_free (p);
  return 0;
}

we shouldn't ICE either ... but here the idea wouldn't work (malloc is
not marked necessary but free doesn't match up with it either).



More information about the Gcc-bugs mailing list