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

--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> ---
Yeah, adding restrict there is just wrong; the constructor is called outside
the function, and could e.g. stash a pointer to the object in a global
variable.  What we actually want is to treat this reference parameter like a
value parameter.  Is that information actually useful to the optimizers?

Reply via email to