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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Also consider

void f1 (const S s, S * __restrict q);

where obeying the warning would create a false alias when called as

 f1 (x, &x);

whether passing by value or reference is more efficient also depends on the
context - if the aggregate doesn't live in memory at (all) callers and
register passing conventions are in effect then passing by reference requires
materializing the argument on the stack.

Reply via email to