re PR middle-end/64274 ([ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc)
authorMarek Polacek <polacek@redhat.com>
Fri, 12 Dec 2014 14:02:37 +0000 (14:02 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Fri, 12 Dec 2014 14:02:37 +0000 (14:02 +0000)
PR middle-end/64274
* fold-const.c (fold_binary_loc): Add ANY_INTEGRAL_TYPE_P check.

From-SVN: r218671

gcc/ChangeLog
gcc/fold-const.c

index 44b4ce423799e8f15e3d3b5adf184d1114a98f1e..69797f6b501adc3aed1506be613903d49c0fabc2 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-12  Marek Polacek  <polacek@redhat.com>
+
+       PR middle-end/64274
+       * fold-const.c (fold_binary_loc): Add ANY_INTEGRAL_TYPE_P check.
+
 2014-12-12  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/64269
index ec5ad980430608306e4a246aa84c2a66af79c399..d71fa94d646b1f4c92056d3af8fbfbfaa87a52f1 100644 (file)
@@ -10082,7 +10082,8 @@ fold_binary_loc (location_t loc,
          /* Reassociate (plus (plus (mult) (foo)) (mult)) as
             (plus (plus (mult) (mult)) (foo)) so that we can
             take advantage of the factoring cases below.  */
-         if (TYPE_OVERFLOW_WRAPS (type)
+         if (ANY_INTEGRAL_TYPE_P (type)
+             && TYPE_OVERFLOW_WRAPS (type)
              && (((TREE_CODE (arg0) == PLUS_EXPR
                    || TREE_CODE (arg0) == MINUS_EXPR)
                   && TREE_CODE (arg1) == MULT_EXPR)