commit 619400bca71f10d05e6adfaaef53c67997fb3f57
Author: Jason Merrill <jason@redhat.com>
Date: Thu Dec 18 12:10:38 2014 -0500
PR c++/64251
* decl2.c (mark_used): Don't mark if in_template_function.
@@ -5017,7 +5017,7 @@ mark_used (tree decl, tsubst_flags_t complain)
--function_depth;
}
- if (processing_template_decl)
+ if (processing_template_decl || in_template_function ())
return true;
/* Check this too in case we're within instantiate_non_dependent_expr. */
new file mode 100644
@@ -0,0 +1,7 @@
+// PR c++/64251
+
+class DictionaryValue {};
+template <typename T> void CreateValue(T) {
+ DictionaryValue(0);
+ CreateValue(0);
+}