Commit 7e497d0c by Volker Reichelt Committed by Volker Reichelt

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
parent 0616700c
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.
......
......@@ -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)
{
......
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.
// 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" }
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