re PR tree-optimization/69615 (0 to limit signed range checks don't always use unsign...
authorJakub Jelinek <jakub@redhat.com>
Mon, 4 Jun 2018 07:37:56 +0000 (09:37 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 4 Jun 2018 07:37:56 +0000 (09:37 +0200)
commit261ef15d46a4220c0b7453ac55265c61cda171b1
tree32e5e1d6f447d3cd145d1d5bc36670f50dbfcc38
parent20b11fd41a51d669eec3601571e21e0081f5c5e0
re PR tree-optimization/69615 (0 to limit signed range checks don't always use unsigned compare)

PR tree-optimization/69615
* fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
maximum or minimum of the type, try to merge it also as if
range1 is + [-, x - 1] or + [x + 1, -].

* gcc.dg/pr69615.c: New test.

From-SVN: r261139
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr69615.c [new file with mode: 0644]