diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-04 19:13:55 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-01-04 19:13:55 +0000 |
commit | 47b6aec2503804f9bec048863c71bceb18975c39 (patch) | |
tree | f8dd5a96b205ed25febcde0f5b42ffbbf44a7a00 | |
parent | 56c4f422a7d03c4004acebe3224390ffbf364a95 (diff) | |
download | gcc-47b6aec2503804f9bec048863c71bceb18975c39.tar.gz |
Protect second call to extract_range_from_multiplicative_op_1
Following on from:
* tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
for VR_RANGE only; don't allow VR_ANTI_RANGE.
(extract_range_from_binary_expr_1): Don't call
extract_range_from_multiplicative_op_1 if !range_int_cst_p.
there was a later call to extract_range_from_multiplicative_op_1 too,
that used a negative test for a symbolic (!is_gimple_min_invariant)
range rather than a positive test for an integer range.
2017-11-04 Richard Sandiford <richard.sandiford@linaro.org>
gcc/
* tree-vrp.c (extract_range_from_binary_expr_1): Check
range_int_cst_p rather than !symbolic_range_p before calling
extract_range_from_multiplicative_op_1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256262 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-vrp.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 26d9210a1b3..b981ff42487 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-04 Richard Sandiford <richard.sandiford@linaro.org> + + * tree-vrp.c (extract_range_from_binary_expr_1): Check + range_int_cst_p rather than !symbolic_range_p before calling + extract_range_from_multiplicative_op_1. + 2017-01-04 Jeff Law <law@redhat.com> * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index e6f04bb0bd9..69762ab795e 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -2042,7 +2042,7 @@ extract_range_from_binary_expr_1 (value_range *vr, return; } } - else if (!symbolic_range_p (&vr0) && !symbolic_range_p (&vr1)) + else if (range_int_cst_p (&vr0) && range_int_cst_p (&vr1)) { extract_range_from_multiplicative_op_1 (vr, code, &vr0, &vr1); return; |