PR tree-optimization/69615
commitbaa4fd4bd0ac9780eda530d5c497ab01bd933737
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Jun 2018 07:37:56 +0000 (4 07:37 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Jun 2018 07:37:56 +0000 (4 07:37 +0000)
tree32e5e1d6f447d3cd145d1d5bc36670f50dbfcc38
parent13279975c3ae71a0bfefcd506c9033d11d8f9736
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261139 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr69615.c [new file with mode: 0644]