From 21431f802af30d387ef124d215a6b2d58e289f78 Mon Sep 17 00:00:00 2001 From: Tom Wood Date: Tue, 24 Nov 1992 02:08:38 +0000 Subject: [PATCH] (range_test): Convert the constants to the unsigned type before expanding the range test. From-SVN: r2785 --- gcc/fold-const.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/fold-const.c b/gcc/fold-const.c index c0aac0a1f7c..f7c2b8a73f1 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2551,6 +2551,8 @@ range_test (jcode, type, lo_code, hi_code, var, lo_cst, hi_cst) { utype = unsigned_type (utype); var = convert (utype, var); + lo_cst = convert (utype, lo_cst); + hi_cst = convert (utype, hi_cst); } return fold (convert (type, -- 2.30.2