]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR middle-end/64292
authormpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Dec 2014 12:15:14 +0000 (12:15 +0000)
committermpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 15 Dec 2014 12:15:14 +0000 (12:15 +0000)
* fold-const.c (negate_expr_p): Add INTEGRAL_TYPE_P check.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218745 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fold-const.c

index ced0bb9fe6fd40c9cff18bbecaa69afc057c6b21..60811d5ae0df4f958afd022b73631f30ca159e0c 100644 (file)
@@ -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.
index d71fa94d646b1f4c92056d3af8fbfbfaa87a52f1..07da71ae1968b181339e82e1b2cf452ed01c1a5d 100644 (file)
@@ -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.  */