summaryrefslogtreecommitdiffstats
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-15 22:05:09 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-15 22:05:09 +0000
commit1e2e9a19da37e0003ac277122cc06941f3368024 (patch)
treefb250efb394301de4933b4d6c037ad6511e163d8 /gcc/explow.c
parent04bf5adad420f5e76e7a2a573bed765c290e7276 (diff)
downloadppe42-gcc-1e2e9a19da37e0003ac277122cc06941f3368024.tar.gz
ppe42-gcc-1e2e9a19da37e0003ac277122cc06941f3368024.zip
* explow.c (expr_size): If DECL and size specified, use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43407 138bc75d-0d04-0410-961f-82ee72b054a4
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 921e5556039..0281826508a 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))
OpenPOWER on IntegriCloud