re PR c++/52126 (compilation error)
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
This commit is contained in:
parent
2f46ac4db1
commit
6acc8d53a9
5 changed files with 74 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -11880,7 +11880,7 @@ xref_basetypes (tree ref, tree base_list)
|
|||
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. */
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
28
gcc/testsuite/g++.dg/template/using21.C
Normal file
28
gcc/testsuite/g++.dg/template/using21.C
Normal file
|
@ -0,0 +1,28 @@
|
|||
// 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;
|
||||
};
|
||||
};
|
33
gcc/testsuite/g++.dg/template/using22.C
Normal file
33
gcc/testsuite/g++.dg/template/using22.C
Normal file
|
@ -0,0 +1,33 @@
|
|||
// 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;
|
||||
};
|
||||
};
|
Loading…
Add table
Reference in a new issue