]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/65061 (Issue with using declaration and member class template)
authorJason Merrill <jason@redhat.com>
Thu, 3 Mar 2016 18:43:01 +0000 (13:43 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 3 Mar 2016 18:43:01 +0000 (13:43 -0500)
PR c++/65061
* parser.c (cp_parser_template_name): Call strip_using_decl.

From-SVN: r233942

gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/g++.dg/inherit/using8.C [new file with mode: 0644]

index 8d014bef83cadac0035d367ab184710955be220e..11a92254cbd75713cb5feec12ec9e81d91977ba2 100644 (file)
@@ -1,3 +1,8 @@
+2016-03-03  Jason Merrill  <jason@redhat.com>
+
+       PR c++/65061
+       * parser.c (cp_parser_template_name): Call strip_using_decl.
+
 2016-02-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
        Backported from mainline
index c811c482725d48043c38a3082fb96043fafdcab5..cc55689125106883ae073a3fc3eb73dac4ced866 100644 (file)
@@ -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 (file)
index 0000000..b7677c8
--- /dev/null
@@ -0,0 +1,15 @@
+// PR c++/65061
+
+struct B
+{
+  template<typename T>
+  struct S {};
+};
+
+struct D : B
+{
+  using B::S;
+
+  template<typename T>
+  void doIt(/*struct*/ S<T>&);
+};