diff options
author | Jason Merrill <jason@redhat.com> | 2015-08-06 10:26:18 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-08-06 10:26:18 -0400 |
commit | c1153c1987ba906a8763a0c0de49fe2e6b3937f0 (patch) | |
tree | acf5d40bd4846ad508391330ae43ab576f5f31b7 /gcc/cp | |
parent | 47486460a94e656b9c4da3e8f9dc3be8c0b9e657 (diff) | |
download | gcc-c1153c1987ba906a8763a0c0de49fe2e6b3937f0.zip gcc-c1153c1987ba906a8763a0c0de49fe2e6b3937f0.tar.gz gcc-c1153c1987ba906a8763a0c0de49fe2e6b3937f0.tar.bz2 |
re PR c++/67130 (ICE: tree check: expected identifier_node, have template_decl in write_unqualified_id, at cp/mangle.c:1218)
PR c++/67130
PR c++/67131
PR c++/66260
* mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable
templates.
* pt.c (tsubst_copy_and_build): Check for argument substitution
failure.
From-SVN: r226676
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/cp/mangle.c | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 2 |
3 files changed, 15 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 986b942..e8d45dc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,13 @@ +2015-08-06 Jason Merrill <jason@redhat.com> + + PR c++/67130 + PR c++/67131 + PR c++/66260 + * mangle.c (write_expression) [TEMPLATE_ID_EXPR]: Handle variable + templates. + * pt.c (tsubst_copy_and_build): Check for argument substitution + failure. + 2015-08-05 Jason Merrill <jason@redhat.com> * pt.c (determine_specialization): Print candidates after 'no diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index d471f4f..4518f20 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -2822,7 +2822,9 @@ write_expression (tree expr) { tree fn = TREE_OPERAND (expr, 0); if (is_overloaded_fn (fn)) - fn = DECL_NAME (get_first_fn (fn)); + fn = get_first_fn (fn); + if (DECL_P (fn)) + fn = DECL_NAME (fn); if (IDENTIFIER_OPNAME_P (fn)) write_string ("on"); write_unqualified_id (fn); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 08fb2ff..c3bafd3 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -14752,6 +14752,8 @@ tsubst_copy_and_build (tree t, if (targs) targs = tsubst_template_args (targs, args, complain, in_decl); + if (targs == error_mark_node) + return error_mark_node; if (variable_template_p (templ)) { |