This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/64274] [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 11 Dec 2014 18:05:08 +0000
- Subject: [Bug middle-end/64274] [5.0 Regression][ARM] gcc.target/arm/fixed-point-exec.c ICE in fold_binary_loc
- Auto-submitted: auto-generated
- References: <bug-64274-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64274
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-12-11
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
Target Milestone|--- |5.0
Ever confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Does the following fix it?
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 7b68bea..34f5a6b 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -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)