aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-diagnostic.c
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2021-06-30 14:15:53 -0400
committerAndrew MacLeod <amacleod@redhat.com>2021-07-02 11:34:53 -0400
commit84f7bab89279ca1234fef88929c74caeda8cb55e (patch)
tree708a82e60c51b389b97afe85ae048da09d0ba3e3 /gcc/tree-diagnostic.c
parent18d0fad77b580d1ac64ed04d94fd3c9795687b91 (diff)
downloadgcc-84f7bab89279ca1234fef88929c74caeda8cb55e.zip
gcc-84f7bab89279ca1234fef88929c74caeda8cb55e.tar.gz
gcc-84f7bab89279ca1234fef88929c74caeda8cb55e.tar.bz2
Fix build_gt and build_lt for signed 1 bit values.
Signed 1 bit values have a range of [-1, 0] but neither (0 - 1) nor (-1 + 1) can be represented. For signed values, add or subtract -1 as appropriate. PR tree-optimization/101223 gcc/ * range-op.cc (build_lt): Add -1 for signed values. (built_gt): Subtract -1 for signed values. gcc/testsuite/ * gcc.dg/pr101223.c: New.
Diffstat (limited to 'gcc/tree-diagnostic.c')
0 files changed, 0 insertions, 0 deletions