fold-const.c (build_range_check): If !in_p and recursive call fails, exit immediately.
authorJakub Jelinek <jakub@redhat.com>
Fri, 18 Jun 2004 23:15:59 +0000 (01:15 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 18 Jun 2004 23:15:59 +0000 (01:15 +0200)
commite1af8299421eb7261ddcadf3630cf6dfa6c32099
treea3d6ae542615df88c6d0ba17800fb0f3dd2fbf4b
parentcaf2523d6d984c1c46b1c5056b835448f4fc02a9
fold-const.c (build_range_check): If !in_p and recursive call fails, exit immediately.

* fold-const.c (build_range_check): If !in_p and recursive call
fails, exit immediately.  If high - low overflows and etype is
a signed type, retry with unsigned etype.
(merge_ranges): If !in0_p and !in1_p, handle even range2 adjacent
to range1 at TYPE_MAX_VALUE and TYPE_MIN_VALUE.

* gcc.dg/range-test-1.c: New test.
* g++.dg/opt/range-test-1.C: New test.

From-SVN: r83369
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/range-test-1.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/range-test-1.c [new file with mode: 0644]