Commit 3633df5a by Richard Guenther Committed by Richard Biener

re PR middle-end/35400 (-Wtype-limits -O2 causes ICE tree check: expected…

re PR middle-end/35400 (-Wtype-limits -O2 causes ICE tree check: expected ssa_name, have addr_expr in get_value_range, at tree-vrp.c:469)

2008-04-06  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/35400
	* tree-vrp.c (vrp_evaluate_conditional): Only query value-range
	information from SSA_NAMEs.

	* gcc.dg/torture/pr35400.c: New testcase.
	* g++.dg/torture/pr35400.C: Likewise.

From-SVN: r133967
parent 5dc77808
2008-04-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/35400
* tree-vrp.c (vrp_evaluate_conditional): Only query value-range
information from SSA_NAMEs.
2008-04-06 Anatoly Sokolov <aesok@post.ru> 2008-04-06 Anatoly Sokolov <aesok@post.ru>
* config/avr/avr.h (avr_mega_p): Remove declaration. * config/avr/avr.h (avr_mega_p): Remove declaration.
......
2008-04-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/35400
* gcc.dg/torture/pr35400.c: New testcase.
* g++.dg/torture/pr35400.C: Likewise.
2008-04-06 Paul Thomas <pault@gcc.gnu.org> 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35780 PR fortran/35780
/* { dg-do compile } */
/* { dg-options "-Wtype-limits" } */
struct A
{
A();
~A();
};
void foo()
{
A x[1];
}
/* { dg-do compile } */
/* { dg-options "-Wtype-limits" } */
struct A
{
struct A *p;
};
int foo(const struct A *q)
{
return q->p == q;
}
void bar(int);
void baz()
{
struct A a;
while (foo(&a))
bar(foo(&a));
}
...@@ -5385,7 +5385,8 @@ vrp_evaluate_conditional (tree cond, tree stmt) ...@@ -5385,7 +5385,8 @@ vrp_evaluate_conditional (tree cond, tree stmt)
if (warn_type_limits if (warn_type_limits
&& ret && ret
&& TREE_CODE_CLASS (TREE_CODE (cond)) == tcc_comparison) && TREE_CODE_CLASS (TREE_CODE (cond)) == tcc_comparison
&& TREE_CODE (TREE_OPERAND (cond, 0)) == SSA_NAME)
{ {
/* If the comparison is being folded and the operand on the LHS /* If the comparison is being folded and the operand on the LHS
is being compared against a constant value that is outside of is being compared against a constant value that is outside of
......
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