aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2006-08-25 16:56:07 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2006-08-25 16:56:07 +0000
commit7d3bec9db50a2d46f697ad621edd50165e51c168 (patch)
tree1975a26da88ae00800dc1b09ba8808327325e61d /gcc/testsuite
parent9eb8a531c0127cff8323c43fc9b148e585cd9288 (diff)
downloadgcc-7d3bec9db50a2d46f697ad621edd50165e51c168.zip
gcc-7d3bec9db50a2d46f697ad621edd50165e51c168.tar.gz
gcc-7d3bec9db50a2d46f697ad621edd50165e51c168.tar.bz2
re PR c++/27787 (Qualified lookup fails to find inherited class template)
cp/ PR c++/27787 * decl.c (make_typename_type): Only try and resolve it when context is not dependent. Refactor. * decl2.c (check_classfn): Push to class scope before looking for the function. testsuite/ PR c++/27787 * g++.dg/template/typename10.C: New. * g++.dg/template/lookup4.C: Remove bogus error marker. From-SVN: r116409
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/g++.dg/template/lookup4.C2
-rw-r--r--gcc/testsuite/g++.dg/template/typename10.C24
3 files changed, 31 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2a1485c..8e9e60a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/27787
+ * g++.dg/template/typename10.C: New.
+ * g++.dg/template/lookup4.C: Remove bogus error marker.
+
2006-08-25 Richard Guenther <rguenther@suse.de>
PR testsuite/28829
diff --git a/gcc/testsuite/g++.dg/template/lookup4.C b/gcc/testsuite/g++.dg/template/lookup4.C
index d640061..3bd73a3 100644
--- a/gcc/testsuite/g++.dg/template/lookup4.C
+++ b/gcc/testsuite/g++.dg/template/lookup4.C
@@ -2,5 +2,5 @@
template <class T> struct Base {};
template <class T> struct Derived: public Base<T> {
- typename Derived::template Base<double>* p1; // { dg-error "" }
+ typename Derived::template Base<double>* p1;
};
diff --git a/gcc/testsuite/g++.dg/template/typename10.C b/gcc/testsuite/g++.dg/template/typename10.C
new file mode 100644
index 0000000..f6f9931
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/typename10.C
@@ -0,0 +1,24 @@
+// { dg-do compile }
+
+// Copyright (C) 2006 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 25 Aug 2006 <nathan@codesourcery.com>
+
+// Origin: Tobias Schwinger <tschwinger@neoscientists.org>
+// PR 27787. Too eager to resolve a typename
+
+template<typename X>
+struct x
+{
+ template<typename Y>
+ struct y
+ {
+ typedef Y type;
+ };
+};
+
+template<typename A>
+struct a : x<A>
+{
+ template<typename B>
+ typename a::template y<B>::type f(B);
+};