aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Snyder <snyder@fnal.gov>1998-05-29 19:17:23 -0400
committerJason Merrill <jason@gcc.gnu.org>1998-05-29 19:17:23 -0400
commit25868f6cad6033f99e065cbec286171ec85268cd (patch)
treea60e172fb57a4ebe89ee76047bf196d50ad09a2d
parenta681b39b1e25942c6600ffd7e0f06bc091dad6af (diff)
downloadgcc-25868f6cad6033f99e065cbec286171ec85268cd.zip
gcc-25868f6cad6033f99e065cbec286171ec85268cd.tar.gz
gcc-25868f6cad6033f99e065cbec286171ec85268cd.tar.bz2
tree.c (layout_basetypes): If we change TYPE_SIZE, change TYPE_SIZE_UNIT too.
* tree.c (layout_basetypes): If we change TYPE_SIZE, change TYPE_SIZE_UNIT too. From-SVN: r20142
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/tree.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 47725b2..16e5074 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
+
+ * tree.c (layout_basetypes): If we change TYPE_SIZE, change
+ TYPE_SIZE_UNIT too.
+
1998-05-29 Mark Mitchell <mark@markmitchell.com>
* decl.c (grokdeclarator): Don't complain about in-class
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index a5f30ea..c17c71a 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -722,7 +722,11 @@ layout_basetypes (rec, max)
here, as that is for this class, without any virtual base classes. */
TYPE_ALIGN (rec) = record_align;
if (const_size != nonvirtual_const_size)
- TYPE_SIZE (rec) = size_int (const_size);
+ {
+ TYPE_SIZE (rec) = size_int (const_size);
+ TYPE_SIZE_UNIT (rec) = size_binop (FLOOR_DIV_EXPR, TYPE_SIZE (rec),
+ size_int (BITS_PER_UNIT));
+ }
/* Now propagate offset information throughout the lattice. */
for (i = 0; i < n_baseclasses; i++)