On Wed, 2 Jun 2021, Liu Hao via Gcc-help wrote:
However I expect there to be a better way to mitigate this: Is it possible to inform GCC to assume that the return slot cannot alias anything?
I assume we will eventually fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80740 it shouldn't be too hard assuming we agree that it is legal.I am not aware of a way for a user to add restrict on the hidden return pointer.
-- Marc Glisse