re PR c++/19298 (dependent type (references) and calling a function method)

cp:
	PR c++/19298
	* pt.c (tsubst_qualified_id): Call convert_from_reference.
testsuite:
	PR c++/19298
	* g++.dg/template/ref2.C: New.

From-SVN: r93055
This commit is contained in:
Nathan Sidwell 2005-01-07 17:09:15 +00:00 committed by Nathan Sidwell
parent 6992cbd163
commit 5aa56f9d8f
4 changed files with 39 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19298
* pt.c (tsubst_qualified_id): Call convert_from_reference.
2005-01-06 Mark Mitchell <mark@codesourcery.com>
PR c++/19244

View File

@ -7648,6 +7648,8 @@ tsubst_qualified_id (tree qualified_id, tree args,
(expr, scope, current_class_type));
expr = finish_qualified_id_expr (scope, expr, done, address_p);
}
expr = convert_from_reference (expr);
return expr;
}

View File

@ -1,3 +1,8 @@
2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
PR c++/19298
* g++.dg/template/ref2.C: New.
2005-01-07 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.c-torture/compile/pr17529.c (y): Change size of array to 1

View File

@ -0,0 +1,27 @@
// Copyright (C) 2005 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 7 Jan 2005 <nathan@codesourcery.com>
// PR 19298: Rejects legal
// Origin: Andrew Pinski <pinskia@gcc.gnu.org>
struct t
{
void f() const;
};
template <typename _Tp>
struct A
{
static t const& c;
};
template <typename _Tp>
void g(void)
{
A<_Tp>::c.f();
}
void h(void)
{
g<int>();
}