https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81892

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
tail-merging is supposed to handle this I think but it gets defeated by
the removing the dead free(0) call.

We do preserve conditional free as conditional free (as it's faster).

So I think GCC works as designed on the testcase, transforming it to

 if (p)
   free (p);

at least at -Os we should change the above to free (p) I guess where we
have the duplicate bug for.

*** This bug has been marked as a duplicate of bug 80519 ***

Reply via email to