From f17aba3c82d9c316ab550b81cf9c7f141b31b999 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 21 Sep 2017 15:45:36 +0000 Subject: * stor-layout.c (bit_from_pos): Do not distribute the conversion. From-SVN: r253074 --- gcc/stor-layout.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'gcc/stor-layout.c') 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 -- cgit v1.1