diff options
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 8 |
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)) |