PR c++/65646
* decl.c (grokvardecl): Don't call check_explicit_specialization
for non-template members of a class template.
From-SVN: r221810
+2015-04-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/65646
+ * decl.c (grokvardecl): Don't call check_explicit_specialization
+ for non-template members of a class template.
+
2015-04-01 Marek Polacek <polacek@redhat.com>
PR c++/65554
DECL_INTERFACE_KNOWN (decl) = 1;
// Handle explicit specializations and instantiations of variable templates.
- if (orig_declarator)
+ if (orig_declarator
+ /* For GCC 5 fix 65646 this way. */
+ && current_tmpl_spec_kind (template_count) != tsk_none)
decl = check_explicit_specialization (orig_declarator, decl,
template_count, 0);
--- /dev/null
+// PR c++/65646
+
+template <typename = int> class A {};
+template <> A<> &A<>::a; // { dg-error "" }