aboutsummaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2001-06-15 22:05:09 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2001-06-15 18:05:09 -0400
commitf6261a8a6fdda7ea84b9d1ae025f57721230f21f (patch)
treefb250efb394301de4933b4d6c037ad6511e163d8 /gcc/explow.c
parent1c5dd43ff7c78bbdba5e89a6cb16a3e50e1abff9 (diff)
downloadgcc-f6261a8a6fdda7ea84b9d1ae025f57721230f21f.zip
gcc-f6261a8a6fdda7ea84b9d1ae025f57721230f21f.tar.gz
gcc-f6261a8a6fdda7ea84b9d1ae025f57721230f21f.tar.bz2
* explow.c (expr_size): If DECL and size specified, use it.
From-SVN: r43407
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index 921e555..0281826 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -301,7 +301,13 @@ rtx
expr_size (exp)
tree exp;
{
- tree size = size_in_bytes (TREE_TYPE (exp));
+ tree size;
+
+ if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'd'
+ && DECL_SIZE_UNIT (exp) != 0)
+ size = DECL_SIZE_UNIT (exp);
+ else
+ size = size_in_bytes (TREE_TYPE (exp));
if (TREE_CODE (size) != INTEGER_CST
&& contains_placeholder_p (size))