re PR c++/27582 (ICE with invalid template parameter)

PR c++/27582
	* pt.c (any_dependent_template_arguments_p): Return early on invalid
	argument list.

	* g++.dg/template/dependent-args1.C: New test.

From-SVN: r113784
This commit is contained in:
Volker Reichelt 2006-05-15 09:34:59 +00:00 committed by Volker Reichelt
parent 0616700cbc
commit 7e497d0c1f
4 changed files with 20 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27582
* pt.c (any_dependent_template_arguments_p): Return early on invalid
argument list.
PR c++/27581
* search.c (adjust_result_of_qualified_name_lookup): Skip on
invalid context_class.

View File

@ -12760,6 +12760,8 @@ any_dependent_template_arguments_p (tree args)
if (!args)
return false;
if (args == error_mark_node)
return true;
for (i = 0; i < TMPL_ARGS_DEPTH (args); ++i)
{

View File

@ -1,5 +1,8 @@
2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27582
* g++.dg/template/dependent-args1.C: New test.
PR c++/27581
* g++.dg/lookup/this1.C: New test.

View File

@ -0,0 +1,11 @@
// PR c++/27582
// { dg-do compile }
struct A
{
template<int> void foo();
};
template<int N, void (A::*)() = &A::foo<N> > struct B {};
B<int> b; // { dg-error "type/value mismatch|expected a constant|invalid type" }