stor-layout.c (layout_record): Fix off-by-one error when checking length of the TYPE_...
authorRichard Earnshaw <rearnsha@arm.com>
Mon, 18 May 1998 12:08:10 +0000 (12:08 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 18 May 1998 12:08:10 +0000 (08:08 -0400)
* stor-layout.c (layout_record): Fix off-by-one error when checking
length of the TYPE_BINFO vector.

From-SVN: r19850

gcc/ChangeLog
gcc/stor-layout.c

index 1f6ba55cd76e11e4040bb03cd7031e9cc2f619f2..eb0c58ab6bbeea4492b0ce36b7bd960c5b761a6c 100644 (file)
@@ -1,3 +1,8 @@
+Mon May 18 12:07:37 1998  Richard Earnshaw (rearnsha@arm.com)
+
+       * stor-layout.c (layout_record): Fix off-by-one error when checking
+       length of the TYPE_BINFO vector.
+
 Mon May 18 10:59:23 1998  Nick Clifton  <nickc@cygnus.com>
 
        * dbxout.c (dbxout_parms): Use TREE_ARG to compute the type of a
index c5c4d1cf7330dac4f9acfac3d224c34b236fd3f0..c9fee7ba177767aec596a9c40f7e9a0bfb02e43e 100644 (file)
@@ -551,7 +551,7 @@ layout_record (rec)
 
   /* Record the un-rounded size in the binfo node.  But first we check
      the size of TYPE_BINFO to make sure that BINFO_SIZE is available.  */
-  if (TYPE_BINFO (rec) && TREE_VEC_LENGTH (TYPE_BINFO (rec)) >= 6)
+  if (TYPE_BINFO (rec) && TREE_VEC_LENGTH (TYPE_BINFO (rec)) > 6)
     TYPE_BINFO_SIZE (rec) = TYPE_SIZE (rec);
 
 #ifdef ROUND_TYPE_SIZE