+2010-05-03 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/43953
+ * pt.c (most_specialized_class): Pretend we are processing
+ a template decl during the call to coerce_template_parms.
+
2010-05-03 Jason Merrill <jason@redhat.com>
PR c++/42810
tree parms = TREE_VALUE (t);
partial_spec_args = CLASSTYPE_TI_ARGS (TREE_TYPE (t));
+
+ ++processing_template_decl;
+
if (outer_args)
{
int i;
- ++processing_template_decl;
-
/* Discard the outer levels of args, and then substitute in the
template args from the enclosing class. */
partial_spec_args = INNERMOST_TEMPLATE_ARGS (partial_spec_args);
TREE_VEC_ELT (parms, i) =
tsubst (TREE_VEC_ELT (parms, i), outer_args, tf_none, NULL_TREE);
- --processing_template_decl;
}
partial_spec_args =
/*require_all_args=*/true,
/*use_default_args=*/true);
+ --processing_template_decl;
+
if (partial_spec_args == error_mark_node)
return error_mark_node;
+2010-05-03 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/43953
+ * g++.dg/other/crash-12.C: New test.
+
2010-05-03 H.J. Lu <hongjiu.lu@intel.com>
* g++.dg/cdce3.C: Add a space. Updated.
--- /dev/null
+// Origin: PR c++/43953
+
+template<typename T,
+ typename U,
+ typename T::type V> class bad;
+
+// partial specialization
+// for T = U
+template<typename T, typename T::type V>
+class bad<T, T, V>
+{
+public:
+ static void foo() {}
+};
+
+struct dummy
+{
+ typedef int type;
+};
+
+int main()
+{
+ bad<dummy, dummy, 0>::foo();
+}
+