Commit 92b1d23b by Richard Guenther Committed by Richard Biener

re PR tree-optimization/47677 (Hang in VRP)

2011-02-10  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/47677
	* tree-vrp.c (vrp_bitmap_equal_p): Fix comparison of empty bitmaps.

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

From-SVN: r170002
parent fcc414dc
2011-02-10 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47677
* tree-vrp.c (vrp_bitmap_equal_p): Fix comparison of empty bitmaps.
2011-02-10 Jakub Jelinek <jakub@redhat.com>
PR target/47665
......
2011-02-10 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47677
* gcc.dg/torture/pr47677.c: New testcase.
2011-02-10 Iain Sandoe <iains@gcc.gnu.org>
* objc.dg/special/load-category-1.m: Remove unused header.
......
/* { dg-do compile } */
struct S { int s; int u; };
extern int bar (void);
extern struct S *baz (void);
void
foo (int x, struct S *y, char z, int *v, struct S *s)
{
int c, d;
if (x & 2)
d = 1;
else
{
d = (x & 1) ? 11 : 0;
while ((c = (s->s != (s->u & 1) ? s->s : bar ())) != '\0');
c = (s->s != '\\' && (s->u & 4) ? s->s : bar ());
if (c == '<')
goto lab;
}
while ((c = ((s->u & 1) ? s->s : bar ())) != 0
&& ((d != 11 && d != 17) || (v[c] & 1) == 0))
{
lab:;
switch (d)
{
case 14:
if (c == '}')
y = baz ();
d = y->s = z == '<' ? 17 : 11;
}
}
}
......@@ -714,6 +714,8 @@ static inline bool
vrp_bitmap_equal_p (const_bitmap b1, const_bitmap b2)
{
return (b1 == b2
|| ((!b1 || bitmap_empty_p (b1))
&& (!b2 || bitmap_empty_p (b2)))
|| (b1 && b2
&& bitmap_equal_p (b1, b2)));
}
......
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