PR c++/83714
* search.c (any_dependent_bases_p): Handle null TREE_BINFO.
* pt.c (instantiation_dependent_scope_ref_p): True if
any_dependent_bases_p.
From-SVN: r256866
+2018-01-18 Jason Merrill <jason@redhat.com>
+
+ PR c++/83714
+ * search.c (any_dependent_bases_p): Handle null TREE_BINFO.
+ * pt.c (instantiation_dependent_scope_ref_p): True if
+ any_dependent_bases_p.
+
2018-01-18 Paolo Carlini <paolo.carlini@oracle.com>
* cp-tree.h: Fix comment typo (DECL_NON_TRIVIALLY_INITIALIZED_P
{
if (DECL_P (TREE_OPERAND (t, 1))
&& CLASS_TYPE_P (TREE_OPERAND (t, 0))
+ /* A dependent base could make a member inaccessible in the current
+ class. */
+ && !any_dependent_bases_p ()
&& accessible_in_template_p (TREE_OPERAND (t, 0),
TREE_OPERAND (t, 1)))
return false;
if (!type || !CLASS_TYPE_P (type) || !processing_template_decl)
return false;
+ /* If we haven't set TYPE_BINFO yet, we don't know anything about the bases.
+ Return false because in this situation we aren't actually looking up names
+ in the scope of the class, so it doesn't matter whether it has dependent
+ bases. */
+ if (!TYPE_BINFO (type))
+ return false;
+
unsigned i;
tree base_binfo;
FOR_EACH_VEC_SAFE_ELT (BINFO_BASE_BINFOS (TYPE_BINFO (type)), i, base_binfo)
static void
c (e *g)
{
- g->c ();
+ g->c (); // { dg-message "incomplete" }
}
};
};