mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 03:30:27 +08:00
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:
parent
0616700cbc
commit
7e497d0c1f
@ -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.
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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.
|
||||
|
||||
|
11
gcc/testsuite/g++.dg/template/dependent-args1.C
Normal file
11
gcc/testsuite/g++.dg/template/dependent-args1.C
Normal 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" }
|
Loading…
x
Reference in New Issue
Block a user