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
This commit is contained in:
Scott Snyder 1998-05-29 19:17:23 -04:00 committed by Jason Merrill
parent a681b39b1e
commit 25868f6cad
2 changed files with 10 additions and 1 deletions

View file

@ -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

View file

@ -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++)