aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-01-24 23:39:52 -0500
committerJason Merrill <jason@gcc.gnu.org>2012-01-24 23:39:52 -0500
commitd2bb8192ee35dfe3388c8cad3fc8b66a94c676d0 (patch)
tree31abb1a9df36acb1685dd67f9cfe3629d3f0721a
parent5d972ea6d566f299a3d8bca795a8a71b6ef27c70 (diff)
downloadgcc-d2bb8192ee35dfe3388c8cad3fc8b66a94c676d0.zip
gcc-d2bb8192ee35dfe3388c8cad3fc8b66a94c676d0.tar.gz
gcc-d2bb8192ee35dfe3388c8cad3fc8b66a94c676d0.tar.bz2
re PR c++/51917 (g++.old-deja/g++.abi/vmihint.C FAILs)
PR c++/51917 * decl.c (xref_basetypes): Check VEC_length instead of VEC_space. From-SVN: r183509
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/decl.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a79320c..e4a3d6f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2012-01-24 Jason Merrill <jason@redhat.com>
+ PR c++/51917
+ * decl.c (xref_basetypes): Check VEC_length instead of VEC_space.
+
PR c++/51973
* tree.c (called_fns_equal): Check template args.
(cp_tree_equal): Call it.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index ef43dbf..7fba04a 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -11916,8 +11916,8 @@ xref_basetypes (tree ref, tree base_list)
BINFO_BASE_ACCESS_APPEND (binfo, access);
}
- if (VEC_space (tree, CLASSTYPE_VBASECLASSES (ref), 1))
- /* If we have space in the vbase vector, we must have shared at
+ if (VEC_length (tree, CLASSTYPE_VBASECLASSES (ref)) < max_vbases)
+ /* If we didn't get max_vbases vbases, we must have shared at
least one of them, and are therefore diamond shaped. */
CLASSTYPE_DIAMOND_SHAPED_P (ref) = 1;