c++: TI_DEFERRED_ACCESS_CHECKS and dependent decls
authorPatrick Palka <ppalka@redhat.com>
Tue, 16 Jun 2020 12:51:34 +0000 (08:51 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 16 Jun 2020 12:51:34 +0000 (08:51 -0400)
commit28462a4496152c76babdb09806762880633191f5
tree290c70325c865fc3ec293cce2b280df32d668aca
parent668ef28fbb44c1e51d9c5a35b421903c98d87b03
c++: TI_DEFERRED_ACCESS_CHECKS and dependent decls

This adds an assert to enforce_access to verify that we don't defer
access checks of dependent decls -- we should instead be rechecking the
access of such a decl after tsubst'ing into the user of the decl.

gcc/cp/ChangeLog:

* pt.c (perform_instantiation_time_access_checks): No need to
tsubst into decl.
* semantics.c (enforce_access): Verify that decl is not
dependent.
gcc/cp/pt.c
gcc/cp/semantics.c