https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97474
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:96253f069ead0736536de803b06a8053a85039a6 commit r11-6919-g96253f069ead0736536de803b06a8053a85039a6 Author: Jason Merrill <ja...@redhat.com> Date: Tue Jan 26 16:04:24 2021 -0500 c++: Invisible refs are not restrict [PR97474] In this testcase, we refer to the a parameter through a reference in its own member, which we asserted couldn't happen by marking the parameter as 'restrict'. This assumption could also be broken if the address escapes from the constructor. gcc/cp/ChangeLog: PR c++/97474 * call.c (type_passed_as): Don't mark invisiref restrict. gcc/testsuite/ChangeLog: PR c++/97474 * g++.dg/torture/pr97474.C: New test.