* search.c (dependent_base_p): Don't compare a binfo to
current_class_type; use the TREE_TYPE of the binfo instead.
From-SVN: r21971
1998-08-25 Mark Mitchell <mark@markmitchell.com>
+ * search.c (dependent_base_p): Don't compare a binfo to
+ current_class_type; use the TREE_TYPE of the binfo instead.
+
* cp-tree.h (CLASS_TYPE_P): Revise definition.
1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
{
for (; binfo; binfo = BINFO_INHERITANCE_CHAIN (binfo))
{
- if (binfo == current_class_type)
+ if (TREE_TYPE (binfo) == current_class_type)
break;
if (uses_template_parms (TREE_TYPE (binfo)))
return 1;
--- /dev/null
+// Build don't link:
+
+void h(int);
+
+template <class T>
+class i {};
+
+struct B
+{
+ int i;
+};
+
+template <class T>
+struct D : public B
+{
+ void f();
+ void g() { h(i); }
+};
+
+template <class T>
+void D<T>::f()
+{
+ h(i);
+}