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
+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>
* 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>
PR fortran/35780
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-Wtype-limits" } */
+
+struct A
+{
+ A();
+ ~A();
+};
+
+void foo()
+{
+ A x[1];
+}
--- /dev/null
+/* { 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));
+}
if (warn_type_limits
&& 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
is being compared against a constant value that is outside of