From: Jason Merrill Date: Thu, 3 Mar 2016 18:43:01 +0000 (-0500) Subject: re PR c++/65061 (Issue with using declaration and member class template) X-Git-Tag: releases/gcc-4.9.4~291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=639d16778cadf1c2d743503090e406e8df96b84e;p=thirdparty%2Fgcc.git re PR c++/65061 (Issue with using declaration and member class template) PR c++/65061 * parser.c (cp_parser_template_name): Call strip_using_decl. From-SVN: r233942 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8d014bef83ca..11a92254cbd7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2016-03-03 Jason Merrill + + PR c++/65061 + * parser.c (cp_parser_template_name): Call strip_using_decl. + 2016-02-25 Bernd Edlinger Backported from mainline diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index c811c482725d..cc5568912510 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -13669,6 +13669,8 @@ cp_parser_template_name (cp_parser* parser, /*ambiguous_decls=*/NULL, token->location); + decl = strip_using_decl (decl); + /* If DECL is a template, then the name was a template-name. */ if (TREE_CODE (decl) == TEMPLATE_DECL) ; diff --git a/gcc/testsuite/g++.dg/inherit/using8.C b/gcc/testsuite/g++.dg/inherit/using8.C new file mode 100644 index 000000000000..b7677c8f682f --- /dev/null +++ b/gcc/testsuite/g++.dg/inherit/using8.C @@ -0,0 +1,15 @@ +// PR c++/65061 + +struct B +{ + template + struct S {}; +}; + +struct D : B +{ + using B::S; + + template + void doIt(/*struct*/ S&); +};