Commit 33be0bec by Eric Botcazou Committed by Eric Botcazou

expr.c (expand_expr_real_1): Fix formatting glitches.

	* expr.c (expand_expr_real_1) <ARRAY_REF>: Fix formatting glitches.
	<BIT_FIELD_REF>: Remove trailing TAB.
	* varasm.c (output_constructor_bitfield): Fix formatting glitch and
	remove blank line.

From-SVN: r200389
parent 6122e824
2013-06-25 Eric Botcazou <ebotcazou@adacore.com>
* expr.c (expand_expr_real_1) <ARRAY_REF>: Fix formatting glitches.
<BIT_FIELD_REF>: Remove trailing TAB.
* varasm.c (output_constructor_bitfield): Fix formatting glitch and
remove blank line.
2013-06-24 Martin Jambor <mjambor@suse.cz> 2013-06-24 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/57358 PR tree-optimization/57358
......
...@@ -9776,32 +9776,31 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, ...@@ -9776,32 +9776,31 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
break; break;
} }
return expand_expr (fold (value), target, tmode, return
modifier); expand_expr (fold (value), target, tmode, modifier);
} }
} }
else if(TREE_CODE (init) == STRING_CST) else if (TREE_CODE (init) == STRING_CST)
{ {
tree index1 = index;
tree low_bound = array_ref_low_bound (exp); tree low_bound = array_ref_low_bound (exp);
index1 = fold_convert_loc (loc, sizetype, tree index1 = fold_convert_loc (loc, sizetype, treeop1);
treeop1);
/* Optimize the special case of a zero lower bound.
/* Optimize the special-case of a zero lower bound.
We convert the lower bound to sizetype to avoid problems
We convert the low_bound to sizetype to avoid some problems with constant folding. E.g. suppose the lower bound is
with constant folding. (E.g. suppose the lower bound is 1, 1 and its mode is QI. Without the conversion
and its mode is QI. Without the conversion,l (ARRAY (ARRAY + (INDEX - (unsigned char)1))
+(INDEX-(unsigned char)1)) becomes ((ARRAY+(-(unsigned char)1)) becomes
+INDEX), which becomes (ARRAY+255+INDEX). Opps!) */ (ARRAY + (-(unsigned char)1) + INDEX)
which becomes
if (! integer_zerop (low_bound)) (ARRAY + 255 + INDEX). Oops! */
if (!integer_zerop (low_bound))
index1 = size_diffop_loc (loc, index1, index1 = size_diffop_loc (loc, index1,
fold_convert_loc (loc, sizetype, fold_convert_loc (loc, sizetype,
low_bound)); low_bound));
if (0 > compare_tree_int (index1, if (compare_tree_int (index1, TREE_STRING_LENGTH (init)) < 0)
TREE_STRING_LENGTH (init)))
{ {
tree type = TREE_TYPE (TREE_TYPE (init)); tree type = TREE_TYPE (TREE_TYPE (init));
enum machine_mode mode = TYPE_MODE (type); enum machine_mode mode = TYPE_MODE (type);
......
...@@ -5131,7 +5131,6 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size, ...@@ -5131,7 +5131,6 @@ output_constructor (tree exp, unsigned HOST_WIDE_INT size,
local.total_bytes = 0; local.total_bytes = 0;
local.byte_buffer_in_use = outer != NULL; local.byte_buffer_in_use = outer != NULL;
local.byte = outer ? outer->byte : 0; local.byte = outer ? outer->byte : 0;
local.last_relative_index = -1; local.last_relative_index = -1;
gcc_assert (HOST_BITS_PER_WIDE_INT >= BITS_PER_UNIT); gcc_assert (HOST_BITS_PER_WIDE_INT >= BITS_PER_UNIT);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment