aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-03-09 22:34:29 -0500
committerJason Merrill <jason@gcc.gnu.org>2018-03-09 22:34:29 -0500
commit732a431dc94ae7f921e21245061946a1cfe8d9b5 (patch)
tree1866e13a3177da4bb55afe89ddb225577eb96483 /gcc/cp
parent3569f81f2ddc25b1ea22c99230c3e35032bd4752 (diff)
downloadgcc-732a431dc94ae7f921e21245061946a1cfe8d9b5.zip
gcc-732a431dc94ae7f921e21245061946a1cfe8d9b5.tar.gz
gcc-732a431dc94ae7f921e21245061946a1cfe8d9b5.tar.bz2
PR c++/84785 - ICE with alias template and default targs.
* pt.c (type_unification_real): Set processing_template_decl if saw_undeduced == 1. From-SVN: r258407
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/pt.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 05cfb76..95ed64d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,9 @@
2018-03-09 Jason Merrill <jason@redhat.com>
+ PR c++/84785 - ICE with alias template and default targs.
+ * pt.c (type_unification_real): Set processing_template_decl if
+ saw_undeduced == 1.
+
PR c++/84752 - ICE with capture of constexpr array.
* call.c (standard_conversion): Set rvaluedness_matches_p on the
identity conversion under ck_lvalue.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index bc815d2..d91e8bb 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -19977,7 +19977,13 @@ type_unification_real (tree tparms,
location_t save_loc = input_location;
if (DECL_P (parm))
input_location = DECL_SOURCE_LOCATION (parm);
+
+ if (saw_undeduced == 1)
+ ++processing_template_decl;
arg = tsubst_template_arg (arg, full_targs, fcomplain, NULL_TREE);
+ if (saw_undeduced == 1)
+ --processing_template_decl;
+
if (arg != error_mark_node && !uses_template_parms (arg))
arg = convert_template_argument (parm, arg, full_targs, complain,
i, NULL_TREE);