]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pt.c (check_explicit_specialization): Don't test DECL_DECLARED_INLINE_P for a variabl...
authorJason Merrill <jason@redhat.com>
Thu, 7 Aug 2014 01:43:58 +0000 (21:43 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 7 Aug 2014 01:43:58 +0000 (21:43 -0400)
* 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

gcc/cp/ChangeLog
gcc/cp/pt.c

index e4f12b12e2adec9424b0d9631d51653840c12f55..285f058556091217e0d5f658ee2a0faf5e189a9e 100644 (file)
@@ -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
index 57e72168be7c6c7fcba49368ff5858515f0bf5fe..998ace2ca583ec4592b573465e1b8006f30545ca 100644 (file)
@@ -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.  */