From: Richard Henderson Date: Sat, 18 Dec 2004 19:18:48 +0000 (-0800) Subject: stor-layout.c (layout_decl): Unshare size expressions copied from the type. X-Git-Tag: releases/gcc-4.0.0~2076 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e527d38c33ababd3345a46d5cdd9ffc8ac6f6d3;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 64935f63fb6c..e8684138e929 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2004-12-18 Richard Henderson + * 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. diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index ac7fb744f66b..b2f73f000d00 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -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)