diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3861e6603e3..6f2f3d7a9df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-09-21 Richard Sandiford + Alan Hayward + David Sherwood + + * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for + INTEGER_CST rather than a negative test for ADDR_EXPR. + 2017-09-21 Richard Sandiford Alan Hayward David Sherwood diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index 3940d538ca7..9811640c2a5 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -617,7 +617,7 @@ get_value_for_expr (tree expr, bool for_bits_p) } } else if (is_gimple_min_invariant (expr) - && (!for_bits_p || TREE_CODE (expr) != ADDR_EXPR)) + && (!for_bits_p || TREE_CODE (expr) == INTEGER_CST)) { val.lattice_val = CONSTANT; val.value = expr;