Commit c19aaba5 by Nathan Sidwell Committed by Nathan Sidwell

re PR c++/21383 (Crash when finding &a_templated_func<>)

cp:
	PR c++/21383
	* name-lookup.c (arg_assoc): Template args can be null in a
	template-id-expr.
testsuite:
	PR c++/21383
	* g++.dg/overload/koenig2.C: New.

From-SVN: r105553
parent b77fe7b4
2005-10-18 Nathan Sidwell <nathan@codesourcery.com> 2005-10-18 Nathan Sidwell <nathan@codesourcery.com>
PR c++/21383
* name-lookup.c (arg_assoc): Template args can be null in a
template-id-expr.
PR c++/22604 PR c++/22604
* class.c (update_vtable_entry_for_fn): Don't process invalid * class.c (update_vtable_entry_for_fn): Don't process invalid
covariant overriders. covariant overriders.
......
...@@ -4594,6 +4594,7 @@ arg_assoc (struct arg_lookup *k, tree n) ...@@ -4594,6 +4594,7 @@ arg_assoc (struct arg_lookup *k, tree n)
return true; return true;
/* Now the arguments. */ /* Now the arguments. */
if (args)
for (ix = TREE_VEC_LENGTH (args); ix--;) for (ix = TREE_VEC_LENGTH (args); ix--;)
if (arg_assoc_template_arg (k, TREE_VEC_ELT (args, ix)) == 1) if (arg_assoc_template_arg (k, TREE_VEC_ELT (args, ix)) == 1)
return true; return true;
......
2005-10-18 Nathan Sidwell <nathan@codesourcery.com> 2005-10-18 Nathan Sidwell <nathan@codesourcery.com>
PR c++/21383
* g++.dg/overload/koenig2.C: New.
PR c++/23118 PR c++/23118
* g++.dg/overload/error2.C: New. * g++.dg/overload/error2.C: New.
// Copyright (C) 2005 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 18 Oct 2005 <nathan@codesourcery.com>
// PR 21383
// Origin: Matthew Hall <mahall@ncsa.uiuc.edu>
template <class T>
void dummy(T& t);
void anyfunc(int x);
void Foo ()
{
anyfunc (&dummy<>); // { dg-error "cannot resolve overload" "" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment