gcc/testsuite/ChangeLog
2012-02-16 Fabien Chene <fabien@gcc.gnu.org>
PR c++/52126
* g++.dg/template/using21.C: New.
* g++.dg/template/using22.C: Likewise.
gcc/cp/ChangeLog
2012-02-16 Fabien Chene <fabien@gcc.gnu.org>
PR c++/52126
* decl.c (xref_basetypes): call dependent_scope_p instead of
dependent_type_p.
From-SVN: r184328
+2012-02-16 Fabien Chêne <fabien@gcc.gnu.org>
+
+ PR c++/52126
+ * decl.c (xref_basetypes): call dependent_scope_p instead of
+ dependent_type_p.
+
2012-02-16 Jason Merrill <jason@redhat.com>
PR c++/51415
TYPE_FOR_JAVA (ref) = 1;
base_binfo = NULL_TREE;
- if (CLASS_TYPE_P (basetype) && !dependent_type_p (basetype))
+ if (CLASS_TYPE_P (basetype) && !dependent_scope_p (basetype))
{
base_binfo = TYPE_BINFO (basetype);
/* The original basetype could have been a typedef'd type. */
+2012-02-16 Fabien Chêne <fabien@gcc.gnu.org>
+
+ PR c++/52126
+ * g++.dg/template/using21.C: New.
+ * g++.dg/template/using22.C: Likewise.
+
2012-02-16 Jason Merrill <jason@redhat.com>
PR c++/51415
--- /dev/null
+// PR c++/52126
+// { dg-do compile }
+
+template<typename T>
+struct A
+{
+ int foo;
+
+ struct B : A<T>
+ {
+ using A::foo;
+ };
+
+ struct C : A
+ {
+ using A::foo;
+ };
+
+ struct D : A<T>
+ {
+ using A<T>::foo;
+ };
+
+ struct E : A
+ {
+ using A<T>::foo;
+ };
+};
--- /dev/null
+// PR c++/52126
+// { dg-do compile }
+
+template <class T> struct Z {};
+
+template<typename T>
+struct A
+{
+ struct B : A<T>
+ {
+ using A::nonexist; // { dg-error "no members matching" }
+ };
+
+ struct C : A
+ {
+ using A::nonexist; // { dg-error "no members matching" }
+ };
+
+ struct D : A<T>
+ {
+ using A<T>::nonexist; // { dg-error "no members matching" }
+ };
+
+ struct E : A
+ {
+ using A<T>::nonexist; // { dg-error "no members matching" }
+ };
+
+ struct F : Z<T>
+ {
+ using Z<T>::nonexist;
+ };
+};