2017-11-22 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/83104
gcc/
* vr-values.c (simplify_stmt_using_ranges): Check integral argument,
not result.
gcc/testsuite/
* gcc.c-torture/compile/pr83104.c: New file.
From-SVN: r255068
+2017-11-22 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/83104
+ * vr-values.c (simplify_stmt_using_ranges): Check integral argument,
+ not result.
+
2017-11-22 Marek Polacek <polacek@redhat.com>
H.J. Lu <hongjiu.lu@intel.com>
Jason Merrill <jason@redhat.com>
+2017-11-22 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/83104
+ * gcc.c-torture/compile/pr83104.c: New file.
+
2017-11-22 Christophe Lyon <christophe.lyon@linaro.org>
* gcc.target/arm/pr56184.C: Add -Wno-return-type to dg-options.
--- /dev/null
+int *a;
+int foo() {
+ if (a && a - (int *)0 > 0)
+ return 0;
+}
LHS = VAR == VAL1 ? (VAL1 BINOP CST) : (VAL2 BINOP CST) */
if (TREE_CODE_CLASS (rhs_code) == tcc_binary
- && INTEGRAL_TYPE_P (TREE_TYPE (lhs))
+ && INTEGRAL_TYPE_P (TREE_TYPE (rhs1))
&& ((TREE_CODE (rhs1) == INTEGER_CST
&& TREE_CODE (rhs2) == SSA_NAME)
|| (TREE_CODE (rhs2) == INTEGER_CST