Commit 12aea97a by Richard Guenther Committed by Richard Biener

re PR tree-optimization/36978 (ICE in gimple_cond_set_lhs for -O2…

re PR tree-optimization/36978 (ICE in gimple_cond_set_lhs for -O2 -funswitch-loops after tuples merge)

2008-07-31  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/36978
	* tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Do not fold
	the generated condition.

	* gcc.dg/torture/pr36978.c: New testcase.

From-SVN: r138415
parent 1e0f7ffb
2008-07-31 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36978
* tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Do not fold
the generated condition.
2008-07-31 Richard Guenther <rguenther@suse.de>
* passes.c (init_optimization_passes): Always call
pass_early_warn_uninitialized.
* opts.c (decode_options): Do not warn about -Wuninitialized
......
2008-07-31 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36978
* gcc.dg/torture/pr36978.c: New testcase.
2008-07-31 Arnaud Charlet <charlet@adacore.com>
* gnat.dg/sync_iface_test.ad[s,b]: New test.
......
/* { dg-do compile } */
/* { dg-options "-funswitch-loops" } */
unsigned short status;
void foo (const _Bool flag)
{
if (status == 2 || status == 7)
{
while (status != 2 && (status != 7 || !flag))
{
}
}
}
......@@ -123,8 +123,8 @@ tree_may_unswitch_on (basic_block bb, struct loop *loop)
return NULL_TREE;
}
cond = fold_build2 (gimple_cond_code (stmt), boolean_type_node,
gimple_cond_lhs (stmt), gimple_cond_rhs (stmt));
cond = build2 (gimple_cond_code (stmt), boolean_type_node,
gimple_cond_lhs (stmt), gimple_cond_rhs (stmt));
/* To keep the things simple, we do not directly remove the conditions,
but just replace tests with 0/1. Prevent the infinite loop where we
......
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