re PR c++/24671 (ICE with zero-sized arrays)
PR c++/24671 * pt.c (instantiate_template): Handle SFINAE. PR c++/24671 * g++.dg/template/sfinae3.C: New test. From-SVN: r109022
This commit is contained in:
parent
59e7c84ca1
commit
6b6b60aff2
|
@ -1,3 +1,8 @@
|
|||
2005-12-23 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/24671
|
||||
* pt.c (instantiate_template): Handle SFINAE.
|
||||
|
||||
2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
* decl.c (grokdeclarator): Improve diagnostic for friend
|
||||
|
|
|
@ -9149,6 +9149,8 @@ instantiate_template (tree tmpl, tree targ_ptr, tsubst_flags_t complain)
|
|||
/* Substitute template parameters. */
|
||||
fndecl = tsubst (DECL_TEMPLATE_RESULT (gen_tmpl),
|
||||
targ_ptr, complain, gen_tmpl);
|
||||
if (fndecl == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
/* Now we know the specialization, compute access previously
|
||||
deferred. */
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2005-12-23 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/24671
|
||||
* g++.dg/template/sfinae3.C: New test.
|
||||
|
||||
2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
* g++.dg/other/friend4.C: New test.
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// PR c++/24671
|
||||
// { dg-options "" }
|
||||
|
||||
template<typename> struct A
|
||||
{
|
||||
typedef int X;
|
||||
static const int i = 0;
|
||||
};
|
||||
|
||||
template<typename> struct B
|
||||
{
|
||||
B(const B&); // { dg-error "candidate" }
|
||||
typedef typename A<char[A<B>::i]>::X Y;
|
||||
template<typename T> B(T, Y); // { dg-error "call" }
|
||||
};
|
||||
|
||||
B<int> b(0,0);
|
Loading…
Reference in New Issue