https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32911
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'm not sure if one attribute is enough. I think there should be one for
(almost) const functions which may perform some side-effects once, and for
(almost) pure functions which may perform some side-effects once.
DCE when result is unused would be invalid in either case, CSE possible if
arguments are the same, one call dominates the other and arguments are the same
(for the almost const case) and also no memory stores that could be visible to
the call in the latter case.