PR c++/38950
* pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
From-SVN: r144139
+2009-02-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/38950
+ * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
+
2009-02-11 Jason Merrill <jason@redhat.com>
PR c++/39153
/* Convert the ARG to the type of PARM; the deduced non-type
template argument must exactly match the types of the
corresponding parameter. */
- arg = fold (build_nop (TREE_TYPE (parm), arg));
+ arg = fold (build_nop (tparm, arg));
else if (uses_template_parms (tparm))
/* We haven't deduced the type of this parameter yet. Try again
later. */
+2009-02-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/38950
+ * g++.dg/template/array20.C: New test.
+
2009-02-12 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/torture/fp-int-convert-float128-timode.c: Do not check
--- /dev/null
+// PR c++/38950
+
+template <typename T, T N> void f(T(&)[N]);
+
+int main() {
+ int x[2];
+ unsigned int y[2];
+ f(x); // works
+ f(y); // ICE
+}