Commit c78f1e25 by Yuri Rumyantsev Committed by Ilya Enkovich

re PR tree-optimization/63941 (ICE on valid code at -O3 and above on x86_64-linux-gnu)

gcc/

	PR tree-optimization/63941
	* tree-if-conv.c (add_to_predicate_list): Delete wrong assertion that
	DOM_BB has non-true predicate, conditionally set non-true predicate
	for BB.

gcc/testsuite/

	PR tree-optimization/63941
	* gcc.dg/torture/pr63941.c: New test.

From-SVN: r218206
parent 64e5228e
2014-12-01 Yuri Rumyantsev <ysrumyan@gmail.com>
PR tree-optimization/63941
* tree-if-conv.c (add_to_predicate_list): Delete wrong assertion that
DOM_BB has non-true predicate, conditionally set non-true predicate
for BB.
2014-12-01 Martin Jambor <mjambor@suse.cz>
PR ipa/63551
2014-12-01 Yuri Rumyantsev <ysrumyan@gmail.com>
PR tree-optimization/63941
* gcc.dg/torture/pr63941.c: New test.
2014-12-01 Martin Jambor <mjambor@suse.cz>
PR ipa/63551
......
/* { dg-do compile } */
int a, b, c, d[1], e, f, g, h;
void
fn1 ()
{
char i = 0;
for (b = 0; b >= 0;)
for (b = 0; b < 2; b++)
{
d[f] && (e = 0);
h = 1 & a - i ? 0 : a;
c = i = h;
char j = c;
int k = 0;
g = j || j > k;
d[0] = 0;
}
}
......@@ -435,8 +435,10 @@ add_to_predicate_list (struct loop *loop, basic_block bb, tree nc)
{
gcc_assert (flow_bb_inside_loop_p (loop, dom_bb));
bc = bb_predicate (dom_bb);
gcc_assert (!is_true_predicate (bc));
set_bb_predicate (bb, bc);
if (!is_true_predicate (bc))
set_bb_predicate (bb, bc);
else
gcc_assert (is_true_predicate (bb_predicate (bb)));
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Use predicate of bb#%d for bb#%d\n",
dom_bb->index, bb->index);
......
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