mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-06 02:20:34 +08:00
re PR c++/28111 (ICE with invalid friend in template class)
PR c++/28111 * pt.c (determine_specialization): Check for invalid decls. * g++.dg/template/friend43.C: New test. From-SVN: r114887
This commit is contained in:
parent
3e9ac7e525
commit
728da67271
@ -1,5 +1,8 @@
|
||||
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/28111
|
||||
* pt.c (determine_specialization): Check for invalid decls.
|
||||
|
||||
PR c++/28110
|
||||
* pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
|
||||
parameters.
|
||||
|
@ -1354,7 +1354,7 @@ determine_specialization (tree template_id,
|
||||
|
||||
*targs_out = NULL_TREE;
|
||||
|
||||
if (template_id == error_mark_node)
|
||||
if (template_id == error_mark_node || decl == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
fns = TREE_OPERAND (template_id, 0);
|
||||
|
@ -1,5 +1,8 @@
|
||||
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c++/28111
|
||||
* g++.dg/template/friend43.C: New test.
|
||||
|
||||
PR c++/28110
|
||||
* g++.dg/template/crash53.C: New test.
|
||||
|
||||
|
11
gcc/testsuite/g++.dg/template/friend43.C
Normal file
11
gcc/testsuite/g++.dg/template/friend43.C
Normal file
@ -0,0 +1,11 @@
|
||||
// PR c++/28111
|
||||
// { dg-do compile }
|
||||
|
||||
template<typename> void foo();
|
||||
|
||||
template<typename T> struct A
|
||||
{
|
||||
friend void foo<>(typename T::X); // { dg-error "not a class" }
|
||||
};
|
||||
|
||||
A<int> a;
|
Loading…
x
Reference in New Issue
Block a user