[Bug tree-optimization/79697] unused realloc(0, n) not eliminated
glisse at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 28 20:00:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79697
--- Comment #6 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #5)
> Why do we have to special case these functions? Why can't we do this for
> all functions that are marked as const/pure, since we know they have no side
> effects other than their return value?
* I expect we already optimize pure/const functions. Do you have an example
where we don't?
* malloc, strdup, etc are not pure!
More information about the Gcc-bugs
mailing list