Commit fae1034e by Richard Guenther Committed by Richard Biener

re PR tree-optimization/40640 (ICE in set_value_range, at tree-vrp.c:383)

2009-07-03  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/40640
	* tree-switch-conversion.c (build_arrays): Perform arithmetic
	in original type.

	* gcc.c-torture/compile/pr40640.c: New testcase.

From-SVN: r149211
parent ba8978d0
2009-07-03 Richard Guenther <rguenther@suse.de>
PR tree-optimization/40640
* tree-switch-conversion.c (build_arrays): Perform arithmetic
in original type.
2009-07-03 Jan Hubicka <jh@suse.cz>
* ipa-inline.c (cgraph_decide_inlining_incrementally): When optimizing
......
2009-07-03 Richard Guenther <rguenther@suse.de>
PR tree-optimization/40640
* gcc.c-torture/compile/pr40640.c: New testcase.
2009-07-03 Richard Guenther <rguenther@suse.de>
PR middle-end/34163
* gfortran.dg/pr34163.f90: New testcase.
......
void decode_opic_address(int *);
void sim_io_printf_filtered2 (int, unsigned);
void
hw_opic_io_read_buffer(int index)
{
unsigned reg = 0;
decode_opic_address(&index);
switch (index)
{
case 0:
reg = 1;
}
sim_io_printf_filtered2 (index, reg);
}
......@@ -556,13 +556,13 @@ build_arrays (gimple swtch)
gsi = gsi_for_stmt (swtch);
arr_index_type = build_index_type (info.range_size);
tmp = create_tmp_var (arr_index_type, "csti");
tmp = create_tmp_var (TREE_TYPE (info.index_expr), "csti");
add_referenced_var (tmp);
tidx = make_ssa_name (tmp, NULL);
sub = fold_build2 (MINUS_EXPR, TREE_TYPE (info.index_expr), info.index_expr,
fold_convert (TREE_TYPE (info.index_expr),
info.range_min));
sub = force_gimple_operand_gsi (&gsi, fold_convert (arr_index_type, sub),
sub = force_gimple_operand_gsi (&gsi, sub,
false, NULL, true, GSI_SAME_STMT);
stmt = gimple_build_assign (tidx, sub);
SSA_NAME_DEF_STMT (tidx) = stmt;
......
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