mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-12 08:49:42 +08:00
re PR c++/13310 (Tree check error in dependent_template_p)
PR c++/13310 * pt.c (dependent_template_p): Handle OVERLOADs. PR c++/13310 * g++.dg/template/crash15.C: New test. From-SVN: r74649
This commit is contained in:
parent
3fe1373814
commit
b95cc51a28
@ -1,3 +1,8 @@
|
|||||||
|
2003-12-15 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
PR c++/13310
|
||||||
|
* pt.c (dependent_template_p): Handle OVERLOADs.
|
||||||
|
|
||||||
2003-12-15 Mark Mitchell <mark@codesourcery.com>
|
2003-12-15 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
PR c++/13243
|
PR c++/13243
|
||||||
|
11
gcc/cp/pt.c
11
gcc/cp/pt.c
@ -11912,6 +11912,17 @@ any_dependent_template_arguments_p (tree args)
|
|||||||
bool
|
bool
|
||||||
dependent_template_p (tree tmpl)
|
dependent_template_p (tree tmpl)
|
||||||
{
|
{
|
||||||
|
if (TREE_CODE (tmpl) == OVERLOAD)
|
||||||
|
{
|
||||||
|
while (tmpl)
|
||||||
|
{
|
||||||
|
if (dependent_template_p (OVL_FUNCTION (tmpl)))
|
||||||
|
return true;
|
||||||
|
tmpl = OVL_CHAIN (tmpl);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* Template template parameters are dependent. */
|
/* Template template parameters are dependent. */
|
||||||
if (DECL_TEMPLATE_TEMPLATE_PARM_P (tmpl)
|
if (DECL_TEMPLATE_TEMPLATE_PARM_P (tmpl)
|
||||||
|| TREE_CODE (tmpl) == TEMPLATE_TEMPLATE_PARM)
|
|| TREE_CODE (tmpl) == TEMPLATE_TEMPLATE_PARM)
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2003-12-15 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
PR c++/13310
|
||||||
|
* g++.dg/template/crash15.C: New test.
|
||||||
|
|
||||||
2003-12-15 Geoffrey Keating <geoffk@apple.com>
|
2003-12-15 Geoffrey Keating <geoffk@apple.com>
|
||||||
|
|
||||||
* g++.old-deja/g++.pt/vaarg3.C: Don't expect an error for passing
|
* g++.old-deja/g++.pt/vaarg3.C: Don't expect an error for passing
|
||||||
|
9
gcc/testsuite/g++.dg/template/crash15.C
Normal file
9
gcc/testsuite/g++.dg/template/crash15.C
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
// PR c++/13310
|
||||||
|
|
||||||
|
struct A {};
|
||||||
|
|
||||||
|
template <typename> void foo()
|
||||||
|
{
|
||||||
|
A a;
|
||||||
|
a.foo<int>(); // { dg-error "" }
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user