diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-09-21 15:45:36 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-09-21 15:45:36 +0000 |
commit | f17aba3c82d9c316ab550b81cf9c7f141b31b999 (patch) | |
tree | 6325b02b4d685a04e146bde2bde57168b841ae8c /gcc/stor-layout.c | |
parent | 65d8c94d372c195d935c3d02a8a9fe566157b769 (diff) | |
download | gcc-f17aba3c82d9c316ab550b81cf9c7f141b31b999.zip gcc-f17aba3c82d9c316ab550b81cf9c7f141b31b999.tar.gz gcc-f17aba3c82d9c316ab550b81cf9c7f141b31b999.tar.bz2 |
* stor-layout.c (bit_from_pos): Do not distribute the conversion.
From-SVN: r253074
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index a6d4307..938be67 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -853,14 +853,10 @@ start_record_layout (tree t) tree bit_from_pos (tree offset, tree bitpos) { - if (TREE_CODE (offset) == PLUS_EXPR) - offset = size_binop (PLUS_EXPR, - fold_convert (bitsizetype, TREE_OPERAND (offset, 0)), - fold_convert (bitsizetype, TREE_OPERAND (offset, 1))); - else - offset = fold_convert (bitsizetype, offset); return size_binop (PLUS_EXPR, bitpos, - size_binop (MULT_EXPR, offset, bitsize_unit_node)); + size_binop (MULT_EXPR, + fold_convert (bitsizetype, offset), + bitsize_unit_node)); } /* Return the combined truncated byte position for the byte offset OFFSET and |