This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/79971] ICE in const_binop, at fold-const.c:1554 on ARM target with saturated integers


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79971

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fix is simple though:

Index: gcc/gimple-expr.c
===================================================================
--- gcc/gimple-expr.c   (revision 245987)
+++ gcc/gimple-expr.c   (working copy)
@@ -124,7 +124,7 @@
   /* Fixed point types with the same mode are compatible.  */
   else if (FIXED_POINT_TYPE_P (inner_type)
           && FIXED_POINT_TYPE_P (outer_type))
-    return true;
+    return TYPE_SATURATING (inner_type) == TYPE_SATURATING (outer_type);

   /* We need to take special care recursing to pointed-to types.  */
   else if (POINTER_TYPE_P (inner_type)


appearantly fixed-point support doesn't get much testing...

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]