aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2014-08-06 21:43:58 -0400
committerJason Merrill <jason@gcc.gnu.org>2014-08-06 21:43:58 -0400
commitd06a312a4f1f535bfed77771300a2bd0ad319089 (patch)
tree6e8b3e0251e6a32e330d2ec85273721cf4b292fe /gcc
parent3b024f233dca428efdc755fe0d560e5d23696afc (diff)
downloadgcc-d06a312a4f1f535bfed77771300a2bd0ad319089.zip
gcc-d06a312a4f1f535bfed77771300a2bd0ad319089.tar.gz
gcc-d06a312a4f1f535bfed77771300a2bd0ad319089.tar.bz2
pt.c (check_explicit_specialization): Don't test DECL_DECLARED_INLINE_P for a variable template.
* pt.c (check_explicit_specialization): Don't test DECL_DECLARED_INLINE_P for a variable template. Co-Authored-By: Braden Obrzut <admin@maniacsvault.net> From-SVN: r213687
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/pt.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e4f12b1..285f058 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2014-08-06 Jason Merrill <jason@redhat.com>
+ Braden Obrzut <admin@maniacsvault.net>
+
+ * pt.c (check_explicit_specialization): Don't test
+ DECL_DECLARED_INLINE_P for a variable template.
+
2014-08-06 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/43906
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 57e7216..998ace2 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -2817,9 +2817,11 @@ check_explicit_specialization (tree declarator,
It's just the name of an instantiation. But, it's not
a request for an instantiation, either. */
SET_DECL_IMPLICIT_INSTANTIATION (decl);
- else
+ else if (TREE_CODE (decl) == FUNCTION_DECL)
/* A specialization is not necessarily COMDAT. */
DECL_COMDAT (decl) = DECL_DECLARED_INLINE_P (decl);
+ else if (TREE_CODE (decl) == VAR_DECL)
+ DECL_COMDAT (decl) = false;
/* Register this specialization so that we can find it
again. */