aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-07-01 16:24:38 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-07-01 16:24:38 -0400
commit948587e7984eca232fcc1d05866c0e40ac1e0af9 (patch)
tree6eb08d940b78e3b7870d1bce00e9c96ec3b35a00 /gcc/cp
parentd816a3ba71e05342e7ddbf9c0a7b0bb67d05dc12 (diff)
downloadgcc-948587e7984eca232fcc1d05866c0e40ac1e0af9.zip
gcc-948587e7984eca232fcc1d05866c0e40ac1e0af9.tar.gz
gcc-948587e7984eca232fcc1d05866c0e40ac1e0af9.tar.bz2
re PR c++/48261 (internal compiler error: in lookup_template_function, at cp/pt.c:6227)
PR c++/48261 * pt.c (lookup_template_function): Handle non-function. From-SVN: r175766
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/pt.c8
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5cfdfbf..38ede64 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2011-07-01 Jason Merrill <jason@redhat.com>
+ PR c++/48261
+ * pt.c (lookup_template_function): Handle non-function.
+
PR c++/48593
* pt.c (tsubst_qualified_id): Check PTRMEM_OK_P.
* tree.c (build_qualified_name): Set PTRMEM_OK_P.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 5743159..7236e7e 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6622,8 +6622,12 @@ lookup_template_function (tree fns, tree arglist)
return error_mark_node;
gcc_assert (!arglist || TREE_CODE (arglist) == TREE_VEC);
- gcc_assert (fns && (is_overloaded_fn (fns)
- || TREE_CODE (fns) == IDENTIFIER_NODE));
+
+ if (!is_overloaded_fn (fns) && TREE_CODE (fns) != IDENTIFIER_NODE)
+ {
+ error ("%q#D is not a function template", fns);
+ return error_mark_node;
+ }
if (BASELINK_P (fns))
{