summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/fold-const.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ced0bb9fe6f..60811d5ae0d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-15 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/64292
+ * fold-const.c (negate_expr_p): Add INTEGRAL_TYPE_P check.
+
2014-12-15 Renlin Li <renlin.li@arm.com>
* config/aarch64/aarch64.h (CLZ_DEFINED_VALUE_AT_ZERO): Return 2.
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index d71fa94d646..07da71ae196 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -400,7 +400,7 @@ negate_expr_p (tree t)
switch (TREE_CODE (t))
{
case INTEGER_CST:
- if (TYPE_OVERFLOW_WRAPS (type))
+ if (INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_WRAPS (type))
return true;
/* Check that -CST will not overflow type. */