commit c1e703a6f795ea63609098607b4484e4b516af41
Author: Jason Merrill <jason@redhat.com>
Date: Wed May 13 15:57:00 2015 -0400
* pt.c (retrieve_specialization): Make sure our arguments have
gone through strip_typedefs.
@@ -1058,6 +1058,14 @@ retrieve_specialization (tree tmpl, tree args, hashval_t hash)
? TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (tmpl))
: template_class_depth (DECL_CONTEXT (tmpl))));
+#ifdef ENABLE_CHECKING
+ /* We should have gone through coerce_template_parms by now. */
+ ++processing_template_decl;
+ if (!any_dependent_template_arguments_p (args))
+ gcc_assert (strip_typedefs_expr (args, NULL) == args);
+ --processing_template_decl;
+#endif
+
if (optimize_specialization_lookup_p (tmpl))
{
tree class_template;