PR c++/89682 - wrong access error in default argument.
authorJason Merrill <jason@redhat.com>
Mon, 18 Mar 2019 15:58:24 +0000 (11:58 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 18 Mar 2019 15:58:24 +0000 (11:58 -0400)
commitb6e45a40cde2c8e7a18b62cca23dcd2f6916afa1
treea190096cda3c6cb88a3573692e82d805f3f14f1f
parentca6d4a08c120841654acb10b973b0d009b053ef3
PR c++/89682 - wrong access error in default argument.

Here we were pushing into the right access context, but we were called from
a deferred checking context, so didn't end up doing the checks until after
we left the access context.

* pt.c (tsubst_default_argument): Don't defer access checks.

From-SVN: r269766
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/overload/defarg12.C [new file with mode: 0644]