diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-22 03:45:43 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-22 03:45:43 +0000 |
commit | 885349ace531951802714131e200c324b7ba64de (patch) | |
tree | f779b1f3cb43ec94e1d6c785bb2e547a8f9a246c /gcc/cp/pt.c | |
parent | 1fb5285bcaf6bc3b4fdc0f2605549f74954ded29 (diff) | |
download | gcc-885349ace531951802714131e200c324b7ba64de.tar.gz |
PR c++/71630 - extern variable template
* pt.c (instantiate_decl): Fix pattern_defined for namespace scope
variable templates.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238622 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index d7f380857bd..5e29d998287 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. */ |