aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorTom Wood <wood@gnu.org>1992-11-24 02:08:38 +0000
committerTom Wood <wood@gnu.org>1992-11-24 02:08:38 +0000
commit21431f802af30d387ef124d215a6b2d58e289f78 (patch)
tree6a1e950e3110577279dbb5ebdee4e6ffc3265b80 /gcc/fold-const.c
parent6fefc9508b330501aa3db29261164dc47ad4650f (diff)
downloadgcc-21431f802af30d387ef124d215a6b2d58e289f78.zip
gcc-21431f802af30d387ef124d215a6b2d58e289f78.tar.gz
gcc-21431f802af30d387ef124d215a6b2d58e289f78.tar.bz2
(range_test): Convert the constants to the unsigned
type before expanding the range test. From-SVN: r2785
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index c0aac0a..f7c2b8a 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,