stor-layout.c (layout_decl): Unshare size expressions copied from the type.

* stor-layout.c (layout_decl): Unshare size expressions copied
        from the type.

From-SVN: r92359
This commit is contained in:
Richard Henderson 2004-12-18 11:18:48 -08:00 committed by Richard Henderson
parent 2931700801
commit 3e527d38c3
2 changed files with 5 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2004-12-18 Richard Henderson <rth@redhat.com>
* stor-layout.c (layout_decl): Unshare size expressions copied
from the type.
* fold-const.c (multiple_of_p): Handle BIT_AND_EXPR when
BOTTOM is a power of two.

View File

@ -325,8 +325,8 @@ layout_decl (tree decl, unsigned int known_align)
if (DECL_SIZE (decl) == 0)
{
DECL_SIZE (decl) = TYPE_SIZE (type);
DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (type);
DECL_SIZE (decl) = unsave_expr (TYPE_SIZE (type));
DECL_SIZE_UNIT (decl) = unsave_expr (TYPE_SIZE_UNIT (type));
}
else if (DECL_SIZE_UNIT (decl) == 0)
DECL_SIZE_UNIT (decl)