aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2017-06-16 22:27:52 -0400
committerJason Merrill <jason@gcc.gnu.org>2017-06-16 22:27:52 -0400
commit157420b4bd936f18b64d8143a6b3f32f89689412 (patch)
tree3b5de82fcc472501dd501e0fddefa996b399c623 /gcc/cp
parent3eec359d0ddf2cfbcc6454bb478ff417c697801e (diff)
downloadgcc-157420b4bd936f18b64d8143a6b3f32f89689412.zip
gcc-157420b4bd936f18b64d8143a6b3f32f89689412.tar.gz
gcc-157420b4bd936f18b64d8143a6b3f32f89689412.tar.bz2
PR c++/80174 - ICE with partial specialization of member template.
PR c++/71747 * pt.c (get_partial_spec_bindings): Only coerce innermost args. From-SVN: r249319
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/pt.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 48a9cf6..330f0f2 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2017-06-16 Jason Merrill <jason@redhat.com>
+ PR c++/80174 - ICE with partial specialization of member template.
+ PR c++/71747
+ * pt.c (get_partial_spec_bindings): Only coerce innermost args.
+
PR c++/80831 - ICE with -fsyntax-only.
* decl2.c (c_parse_final_cleanups): Use cgraph_node::get_create.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 3dad0fc..0a58163 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -21672,9 +21672,11 @@ get_partial_spec_bindings (tree tmpl, tree spec_tmpl, tree args)
`T' is `A' but unify () does not check whether `typename T::X'
is `int'. */
spec_args = tsubst (spec_args, deduced_args, tf_none, NULL_TREE);
- spec_args = coerce_template_parms (DECL_INNERMOST_TEMPLATE_PARMS (tmpl),
- spec_args, tmpl,
- tf_none, false, false);
+
+ if (spec_args != error_mark_node)
+ spec_args = coerce_template_parms (DECL_INNERMOST_TEMPLATE_PARMS (tmpl),
+ INNERMOST_TEMPLATE_ARGS (spec_args),
+ tmpl, tf_none, false, false);
pop_tinst_level ();