aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2003-12-15 21:55:19 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2003-12-15 21:55:19 +0000
commitb95cc51a28ae5aed45eebcc1a660fdf0a54f115d (patch)
tree6f89e213b504ff3eadcaa84c1524da5efa096a9e /gcc/cp/pt.c
parent3fe1373814015056725f2de2faed739459023b91 (diff)
downloadgcc-b95cc51a28ae5aed45eebcc1a660fdf0a54f115d.zip
gcc-b95cc51a28ae5aed45eebcc1a660fdf0a54f115d.tar.gz
gcc-b95cc51a28ae5aed45eebcc1a660fdf0a54f115d.tar.bz2
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
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 553d4f7..1a03bba 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -11912,6 +11912,17 @@ any_dependent_template_arguments_p (tree args)
bool
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. */
if (DECL_TEMPLATE_TEMPLATE_PARM_P (tmpl)
|| TREE_CODE (tmpl) == TEMPLATE_TEMPLATE_PARM)