aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2013-12-09 22:29:58 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2013-12-09 22:29:58 +0000
commitca0a2d5d0dffed4a7e9f5a5b039876e773ea8624 (patch)
tree99ea963e4cb13d73e73d20836cf62647647ee8cd
parent04a90bec0962d8033af1178899f1bf3501ff062e (diff)
downloadgcc-ca0a2d5d0dffed4a7e9f5a5b039876e773ea8624.zip
gcc-ca0a2d5d0dffed4a7e9f5a5b039876e773ea8624.tar.gz
gcc-ca0a2d5d0dffed4a7e9f5a5b039876e773ea8624.tar.bz2
* optabs.c (gen_int_libfunc): Do not compare modes directly.
From-SVN: r205835
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/optabs.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 846d5b3..7fe4851 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2013-12-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * optabs.c (gen_int_libfunc): Do not compare modes directly.
+
2013-12-09 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (FOR_ALL_BB): Eliminate macro.
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 5172bd4..302bc6c 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -5506,7 +5506,8 @@ gen_int_libfunc (optab optable, const char *opname, char suffix,
if (maxsize < LONG_LONG_TYPE_SIZE)
maxsize = LONG_LONG_TYPE_SIZE;
if (GET_MODE_CLASS (mode) != MODE_INT
- || mode < word_mode || GET_MODE_BITSIZE (mode) > maxsize)
+ || GET_MODE_BITSIZE (mode) < BITS_PER_WORD
+ || GET_MODE_BITSIZE (mode) > maxsize)
return;
gen_libfunc (optable, opname, suffix, mode);
}