re PR middle-end/64292 (FAIL: g++.dg/torture/pr60474.C -O1 (internal compiler...
authorMarek Polacek <polacek@redhat.com>
Mon, 15 Dec 2014 12:15:14 +0000 (12:15 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Mon, 15 Dec 2014 12:15:14 +0000 (12:15 +0000)
PR middle-end/64292
* fold-const.c (negate_expr_p): Add INTEGRAL_TYPE_P check.

From-SVN: r218745

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.  */