Fix MINUS_EXPR relations.
authorAndrew MacLeod <amacleod@redhat.com>
Tue, 29 Jun 2021 14:52:58 +0000 (10:52 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Tue, 29 Jun 2021 18:57:01 +0000 (14:57 -0400)
commita96d8d67d0073a7031c0712bc3fb7759417b2125
treec97b8101babc4728956d07cc914a8b9863a800ac
parent604dce2d74d3417970e23e7ad38322d1adbca2e2
Fix MINUS_EXPR relations.

Flesh out and correct relations for both wrapping and non-wrapping values.

gcc/
PR tree-optimization/101254
* range-op.cc (operator_minus::op1_op2_relation_effect): Check for
wrapping/non-wrapping when setting the result range.

gcc/testsuite
* gcc.dg/pr101254.c: New.
gcc/range-op.cc
gcc/testsuite/gcc.dg/pr101254.c [new file with mode: 0644]