Avoid two_valued_val_range_p for pointers.
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
This commit is contained in:
parent
29a3136e6d
commit
e54675bbab
4 changed files with 17 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
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>
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
5
gcc/testsuite/gcc.c-torture/compile/pr83104.c
Normal file
5
gcc/testsuite/gcc.c-torture/compile/pr83104.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
int *a;
|
||||
int foo() {
|
||||
if (a && a - (int *)0 > 0)
|
||||
return 0;
|
||||
}
|
|
@ -4091,7 +4091,7 @@ vr_values::simplify_stmt_using_ranges (gimple_stmt_iterator *gsi)
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue