Commit e82d7e60 by Diego Novillo Committed by Diego Novillo

re PR tree-optimization/24141 (VRP ICE in compare_name_with_value, at tree-vrp.c:2965)


	PR 24141
	* tree-vrp.c (vrp_meet): Clear VR0->EQUIV when building a
	non-null range as a last resort.

testsuite/

	PR 24141
	* gcc.c-torture/execute/pr24141.c: New test.

From-SVN: r104859
parent fde5c44c
2005-10-01 Diego Novillo <dnovillo@redhat.com>
PR 24141
* tree-vrp.c (vrp_meet): Clear VR0->EQUIV when building a
non-null range as a last resort.
2005-10-01 James A. Morrison <phython@gcc.gnu.org>
Diego Novillo <dnovillo@redhat.com>
......
2005-10-01 Diego Novillo <dnovillo@redhat.com>
PR 24141
* gcc.c-torture/execute/pr24141.c: New test.
2005-10-01 James A. Morrison <phython@gcc.gnu.org>
Diego Novillo <dnovillo@redhat.com>
// reduced testcase, compile with -O2. Also, with --disable-checking
// gcc produces wrong code.
void abort (void);
int i;
void g (void)
{
i = 1;
}
void f (int a, int b)
{
int c = 0;
if (a == 0)
c = 1;
if (c)
return;
if (c == 1)
c = 0;
if (b == 0)
c = 1;
if (c)
g ();
}
int main (void)
{
f (1, 0);
if (i != 1)
abort ();
return 0;
}
......@@ -3439,7 +3439,14 @@ no_meet:
&& !range_includes_zero_p (vr0)
&& !symbolic_range_p (vr1)
&& !range_includes_zero_p (vr1))
set_value_range_to_nonnull (vr0, TREE_TYPE (vr0->min));
{
set_value_range_to_nonnull (vr0, TREE_TYPE (vr0->min));
/* Since this meet operation did not result from the meeting of
two equivalent names, VR0 cannot have any equivalences. */
if (vr0->equiv)
bitmap_clear (vr0->equiv);
}
else
set_value_range_to_varying (vr0);
}
......
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