summaryrefslogtreecommitdiff
path: root/gcc/cp/friend.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/friend.c')
-rw-r--r--gcc/cp/friend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index d92df5f6eba..bc946e8a527 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -171,7 +171,7 @@ add_friend (tree type, tree decl, bool complain)
ctx = DECL_CONTEXT (decl);
if (ctx && CLASS_TYPE_P (ctx) && !uses_template_parms (ctx))
- perform_or_defer_access_check (TYPE_BINFO (ctx), decl);
+ perform_or_defer_access_check (TYPE_BINFO (ctx), decl, decl);
maybe_add_class_template_decl_list (type, decl, /*friend_p=*/1);