summaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-27 19:49:42 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-27 19:49:42 +0000
commitcee43f7ef941b72671461e4341c8725524f10570 (patch)
tree88b2c40a53c2a5175a5910476fd385f50ff0d754 /gcc/c-common.c
parent74e261f8f105ddd2e827704436dce7b71197dd3b (diff)
downloadgcc-cee43f7ef941b72671461e4341c8725524f10570.tar.gz
PR debug/39267
* tree.h (TREE_PROTECTED): Fix comment. (BLOCK_HANDLER_BLOCK): Remove. (struct tree_block): Remove handler_block add body_block. (inlined_function_outer_scope_p): New. (is_body_block): Remove. * dbxout.c (dbxout_block): Remove BLOCK_HANDLER_BLOCK. * dwarf2out.c (is_inlined_entry_point): Remove. (add_high_low_attributes): Use inlined_function_outer_scope_p. (gen_block_die): Use is_inlined_entry_point check; remove body block code. * langhooks.h (struct lang_hooks): Remove no_bodu_blocks. * gimplify.c (gimplify_expr): Gimplify body blocks. * tree-ssa-live.c (remove_unused_scope_block_p): Allow removing wrapper block with multiple subblocks. (dump_scope_block): Prettier output; dump more flags and info. (dump_scope_blocks): New. (remove_unused_locals): Use dump_scope_blocks. * tree-flow.h (dump_scope_blocks): Declare. * tree-cfg.c (execute_build_cfg): Dump scope blocks. * stmt.c (is_body_block): Remove. * tree-inline.c (remap_block): Copy BODY_BLOCK info. * langhooks-def.h (LANG_HOOKS_NO_BODY_BLOCKS): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144474 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index f19976b4af1..a84113f867e 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -7740,6 +7740,7 @@ complete_array_type (tree *ptype, tree initial_value, bool do_default)
tree curindex;
unsigned HOST_WIDE_INT cnt;
constructor_elt *ce;
+ bool fold_p = false;
if (VEC_index (constructor_elt, v, 0)->index)
maxindex = fold_convert (sizetype,
@@ -7751,14 +7752,20 @@ complete_array_type (tree *ptype, tree initial_value, bool do_default)
VEC_iterate (constructor_elt, v, cnt, ce);
cnt++)
{
+ bool curfold_p = false;
if (ce->index)
- curindex = fold_convert (sizetype, ce->index);
+ curindex = ce->index, curfold_p = true;
else
- curindex = size_binop (PLUS_EXPR, curindex, size_one_node);
-
+ {
+ if (fold_p)
+ curindex = fold_convert (sizetype, curindex);
+ curindex = size_binop (PLUS_EXPR, curindex, size_one_node);
+ }
if (tree_int_cst_lt (maxindex, curindex))
- maxindex = curindex;
+ maxindex = curindex, fold_p = curfold_p;
}
+ if (fold_p)
+ maxindex = fold_convert (sizetype, maxindex);
}
}
else