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

--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:85908100051cb63b2fd2c039f3a166d45386b9d9

commit r10-9313-g85908100051cb63b2fd2c039f3a166d45386b9d9
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.

Reply via email to