* explow.c (expr_size): If DECL and size specified, use it.

From-SVN: r43407
This commit is contained in:
Richard Kenner 2001-06-15 22:05:09 +00:00 committed by Richard Kenner
parent 1c5dd43ff7
commit f6261a8a6f
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,7 @@
Fri Jun 15 18:05:22 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* explow.c (expr_size): If DECL and size specified, use it.
2001-06-15 Zack Weinberg <zackw@stanford.edu>
* doc/cpp.texi: Formatting corrections.

View File

@ -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))