Always check the return value of fold_range.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 21 Sep 2022 20:15:02 +0000 (16:15 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 22 Sep 2022 18:48:28 +0000 (14:48 -0400)
commit2f92f685da2ef9e82ee6262519919180df8f2dd9
treeae1e971cdb3c1b762e97f5b5ab1484f2b3bb4b49
parentbe2a25adbdc76a770f7470cc9f47892f7a4139ae
Always check the return value of fold_range.

The fold_range routine in range-ops returns FALSE if the operation
fails.  There are a few places which assume the operation was
successful.  Fix those.

* gimple-range-fold.cc (range_of_range_op): Set result to
VARYING if the call to fold_range fails.
* tree-data-ref.cc (compute_distributive_range): Ditto.
* tree-vrp.cc (range_fold_binary_expr): Ditto.
(range_fold_unary_expr): Ditto.
* value-query.cc (range_query::get_tree_range): Ditto.
gcc/gimple-range-fold.cc
gcc/tree-data-ref.cc
gcc/tree-vrp.cc
gcc/value-query.cc