(range_test): Convert the constants to the unsigned
authorTom Wood <wood@gnu.org>
Tue, 24 Nov 1992 02:08:38 +0000 (02:08 +0000)
committerTom Wood <wood@gnu.org>
Tue, 24 Nov 1992 02:08:38 +0000 (02:08 +0000)
type before expanding the range test.

From-SVN: r2785

gcc/fold-const.c

index c0aac0a1f7c0ab6cfeabf0bdde0319f15de01aaa..f7c2b8a73f19e8768c5c5ad55f1d48146c908a1c 100644 (file)
@@ -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,