+2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
+
+ PR c++/66686
+ * pt.c (coerce_template_template_parm) [PARM_DECL]: Don't
+ return 0 if tsubst returns a dependent type.
+
2015-06-30 Jason Merrill <jason@redhat.com>
PR debug/66653
D<int, C> d;
i.e. the parameter list of TT depends on earlier parameters. */
- if (!uses_template_parms (TREE_TYPE (arg))
- && !same_type_p
- (tsubst (TREE_TYPE (parm), outer_args, complain, in_decl),
- TREE_TYPE (arg)))
- return 0;
+ if (!uses_template_parms (TREE_TYPE (arg)))
+ {
+ tree t = tsubst (TREE_TYPE (parm), outer_args, complain, in_decl);
+ if (!uses_template_parms (t)
+ && !same_type_p (t, TREE_TYPE (arg)))
+ return 0;
+ }
if (TEMPLATE_PARM_PARAMETER_PACK (DECL_INITIAL (arg))
&& !TEMPLATE_PARM_PARAMETER_PACK (DECL_INITIAL (parm)))
+2015-07-01 Patrick Palka <ppalka@gcc.gnu.org>
+
+ PR c++/66686
+ * g++.dg/template/pr66686.C: New test.
+
2015-06-30 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/lto17.ad[sb]: New test.
--- /dev/null
+// PR c++/66686
+
+template <int>
+struct Y { };
+
+template <class B, template <template <B> class Z> class C>
+struct X
+{
+ C<Y> a; // { dg-bogus "mismatch" }
+};
+
+template <template <int> class>
+struct A { };
+
+X<int, A> a;