aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-08-26 19:35:13 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2005-08-26 19:35:13 +0000
commitb207d6e26f1d7f038d0a6d7360e7208cdd97989b (patch)
tree42404833ca3e44c8e6e3cbdf5ee9323a72f203e1 /gcc/cp/pt.c
parentb84f46516bc9e5293d8bc9333b5e8f494e223ff2 (diff)
downloadgcc-b207d6e26f1d7f038d0a6d7360e7208cdd97989b.zip
gcc-b207d6e26f1d7f038d0a6d7360e7208cdd97989b.tar.gz
gcc-b207d6e26f1d7f038d0a6d7360e7208cdd97989b.tar.bz2
re PR c++/19004 (ICE in uses_template_parms at cp/pt.c:4860)
PR c++/19004 * pt.c (uses_template_parms): Handle IDENTIFIER_NODE. (type_dependent_expression_p): Allow BASELINKs whose associated functions are simply a FUNCTION_DECL. PR c++/19004 * g++.dg/template/nontype13.C: New test. From-SVN: r103531
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 71ac318..386dc2f 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -4956,6 +4956,7 @@ uses_template_parms (tree t)
|| TREE_CODE (t) == TEMPLATE_PARM_INDEX
|| TREE_CODE (t) == OVERLOAD
|| TREE_CODE (t) == BASELINK
+ || TREE_CODE (t) == IDENTIFIER_NODE
|| CONSTANT_CLASS_P (t))
dependent_p = (type_dependent_expression_p (t)
|| value_dependent_expression_p (t));
@@ -12356,7 +12357,8 @@ type_dependent_expression_p (tree expression)
return true;
expression = TREE_OPERAND (expression, 0);
}
- gcc_assert (TREE_CODE (expression) == OVERLOAD);
+ gcc_assert (TREE_CODE (expression) == OVERLOAD
+ || TREE_CODE (expression) == FUNCTION_DECL);
while (expression)
{