aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index d7f3808..5e29d99 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -21853,7 +21853,10 @@ instantiate_decl (tree d, int defer_ok,
else
{
deleted_p = false;
- pattern_defined = ! DECL_IN_AGGR_P (code_pattern);
+ if (DECL_CLASS_SCOPE_P (code_pattern))
+ pattern_defined = ! DECL_IN_AGGR_P (code_pattern);
+ else
+ pattern_defined = ! DECL_EXTERNAL (code_pattern);
}
/* We may be in the middle of deferred access check. Disable it now. */