re PR c++/8849 (ICE in resolve_overloaded_unification for invalid code)

PR c++/8849
	* pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.

	* g++.dg/template/ptrmem4.C: New test.

From-SVN: r62181
This commit is contained in:
Kriang Lerdsuwanakij 2003-01-31 16:28:06 +00:00 committed by Kriang Lerdsuwanakij
parent 1824b90d08
commit db0f613dfa
4 changed files with 32 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8849
* pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.
2003-01-31 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX,

View File

@ -8910,7 +8910,8 @@ resolve_overloaded_unification (tparms, targs, parm, arg, strict,
}
}
}
else if (TREE_CODE (arg) == OVERLOAD)
else if (TREE_CODE (arg) == OVERLOAD
|| TREE_CODE (arg) == FUNCTION_DECL)
{
for (; arg; arg = OVL_NEXT (arg))
{

View File

@ -1,3 +1,8 @@
2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8849
* g++.dg/template/ptrmem4.C: New test.
2003-01-29 Mark Mitchell <mark@codesourcery.com>
* g++.dg/parser/constant1.C: New test.

View File

@ -0,0 +1,20 @@
// { dg-do compile }
// Origin: Scott Snyder <snyder@fnal.gov>
// PR c++/8849
// Pointer to member function template argument deduction ICE.
template <class CONT> void queryAliases(CONT& fill_me); // { dg-error "argument" }
struct SpyExample
{
void ready();
void inputs();
};
void SpyExample::ready()
{
queryAliases(inputs); // { dg-error "convert" }
}