PR c++/13310
* pt.c (dependent_template_p): Handle OVERLOADs.
PR c++/13310
* g++.dg/template/crash15.C: New test.
From-SVN: r74649
+2003-12-15 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/13310
+ * pt.c (dependent_template_p): Handle OVERLOADs.
+
2003-12-15 Mark Mitchell <mark@codesourcery.com>
PR c++/13243
bool
dependent_template_p (tree tmpl)
{
+ if (TREE_CODE (tmpl) == OVERLOAD)
+ {
+ while (tmpl)
+ {
+ if (dependent_template_p (OVL_FUNCTION (tmpl)))
+ return true;
+ tmpl = OVL_CHAIN (tmpl);
+ }
+ return false;
+ }
+
/* Template template parameters are dependent. */
if (DECL_TEMPLATE_TEMPLATE_PARM_P (tmpl)
|| TREE_CODE (tmpl) == TEMPLATE_TEMPLATE_PARM)
+2003-12-15 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/13310
+ * g++.dg/template/crash15.C: New test.
+
2003-12-15 Geoffrey Keating <geoffk@apple.com>
* g++.old-deja/g++.pt/vaarg3.C: Don't expect an error for passing
--- /dev/null
+// PR c++/13310
+
+struct A {};
+
+template <typename> void foo()
+{
+ A a;
+ a.foo<int>(); // { dg-error "" }
+}