re PR c++/85146 (ICE with __direct_bases for declared but not defined struct)
PR c++/85146
* cp-tree.h (calculate_bases, calculate_direct_bases): Add complain
argument.
* semantics.c (calculate_bases): Add complain argument. Use
complete_type_or_maybe_complain instead of just complete_type and
return an empty vector if it fails. Move make_tree_vector () call
after early return. Formatting fixes.
(calculate_direct_bases): Likewise. Call release_tree_vector at the
end.
(dfs_calculate_bases_post, calculate_bases_helper): Formatting fixes.
* pt.c (tsubst_pack_expansion): Adjust calculate_bases and
calculate_direct_bases callers, formatting fixes.
* g++.dg/ext/bases2.C: Expect extra error diagnostics.
* g++.dg/ext/bases3.C: New test.
From-SVN: r259101