OSDN Git Service

PR c++/51917
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Jan 2012 04:39:52 +0000 (04:39 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Jan 2012 04:39:52 +0000 (04:39 +0000)
* decl.c (xref_basetypes): Check VEC_length instead of VEC_space.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183509 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c

index a79320c..e4a3d6f 100644 (file)
@@ -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.
index ef43dbf..7fba04a 100644 (file)
@@ -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;