aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2019-04-04 22:50:52 -0400
committerJason Merrill <jason@gcc.gnu.org>2019-04-04 22:50:52 -0400
commit950b198d4a3225cbec2d3408b947bf48057c5762 (patch)
tree9f97099ae79459fe66457bab2f4aadd9040939ae /gcc/cp/pt.c
parent17838af989014f5e90e3a7ab4e519d495c03e726 (diff)
downloadgcc-950b198d4a3225cbec2d3408b947bf48057c5762.zip
gcc-950b198d4a3225cbec2d3408b947bf48057c5762.tar.gz
gcc-950b198d4a3225cbec2d3408b947bf48057c5762.tar.bz2
PR c++/89966 - error with non-type auto tparm.
My patch for PR 86932 broke this testcase by passing tf_partial to coerce_template_template_parms, which prevented do_auto_deduction from actually replacing the auto. * pt.c (do_auto_deduction): Clear tf_partial. From-SVN: r270160
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 20647be..40d954d 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -27504,6 +27504,10 @@ do_auto_deduction (tree type, tree init, tree auto_node,
if (init && undeduced_auto_decl (init))
return type;
+ /* We may be doing a partial substitution, but we still want to replace
+ auto_node. */
+ complain &= ~tf_partial;
+
if (tree tmpl = CLASS_PLACEHOLDER_TEMPLATE (auto_node))
/* C++17 class template argument deduction. */
return do_class_deduction (type, tmpl, init, flags, complain);