]> gcc.gnu.org Git - gcc.git/commit
c++: Invisible refs are not restrict [PR97474]
authorJason Merrill <jason@redhat.com>
Tue, 26 Jan 2021 21:04:24 +0000 (16:04 -0500)
committerJason Merrill <jason@redhat.com>
Fri, 29 Jan 2021 16:00:00 +0000 (11:00 -0500)
commit85908100051cb63b2fd2c039f3a166d45386b9d9
treed8779ae68142efdf734db9a7ba39d06319082402
parent506fcfdb12562e829448e2b2eff475c65986e26b
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.
gcc/cp/call.c
gcc/testsuite/g++.dg/torture/pr97474.C [new file with mode: 0644]
This page took 0.121998 seconds and 6 git commands to generate.