From 069b95ce6dc86b9ef2a8bd3341e420d2f81c6111 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Mon, 18 May 1998 12:08:10 +0000 Subject: stor-layout.c (layout_record): Fix off-by-one error when checking length of the TYPE_BINFO vector. * stor-layout.c (layout_record): Fix off-by-one error when checking length of the TYPE_BINFO vector. From-SVN: r19850 --- gcc/ChangeLog | 5 +++++ gcc/stor-layout.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'gcc') diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1f6ba55..eb0c58a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 * dbxout.c (dbxout_parms): Use TREE_ARG to compute the type of a diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index c5c4d1c..c9fee7b 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -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 -- cgit v1.1