aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2003-04-21 20:43:21 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2003-04-21 16:43:21 -0400
commit1a96dc4634533d7691e4d369658b8c9cfc473a2a (patch)
tree9f64a9df3418ffa0431ef74c0451a2c6d5fc7c7f
parentc3cdeef417a15fc169f24787a2bcb14b73a94854 (diff)
downloadgcc-1a96dc4634533d7691e4d369658b8c9cfc473a2a.zip
gcc-1a96dc4634533d7691e4d369658b8c9cfc473a2a.tar.gz
gcc-1a96dc4634533d7691e4d369658b8c9cfc473a2a.tar.bz2
* stor-layout.c (layout_decl): Don't set DECL_SIZE_UNIT if already set.
From-SVN: r65899
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/stor-layout.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c5d792e..9c52c0f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -56,6 +56,8 @@
2003-04-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+ * stor-layout.c (layout_decl): Don't set DECL_SIZE_UNIT if already set.
+
* expr.c (store_constructor): Set RTX_UNCHANGING_P if readonly_field_p
before clearing.
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 66067d6..dad514e 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -419,7 +419,7 @@ layout_decl (decl, known_align)
DECL_SIZE (decl) = TYPE_SIZE (type);
DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (type);
}
- else
+ else if (DECL_SIZE_UNIT (decl) == 0)
DECL_SIZE_UNIT (decl)
= convert (sizetype, size_binop (CEIL_DIV_EXPR, DECL_SIZE (decl),
bitsize_unit_node));