re PR c++/65646 (ICE in invalid syntax)
PR c++/65646 * decl.c (grokvardecl): Don't call check_explicit_specialization for non-template members of a class template. From-SVN: r221810
This commit is contained in:
parent
b6dd42a9a8
commit
f87cb0b734
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -8210,7 +8210,9 @@ grokvardecl (tree type,
|
|||
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);
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
// PR c++/65646
|
||||
|
||||
template <typename = int> class A {};
|
||||
template <> A<> &A<>::a; // { dg-error "" }
|
Loading…
Reference in New Issue