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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r249447.  I'd go for:
--- match.pd.jj1        2018-05-25 14:34:42.268381974 +0200
+++ match.pd    2018-06-14 15:53:20.538712014 +0200
@@ -1771,10 +1771,11 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
           (neg_inner_op @0 { wide_int_to_tree (type, wi::to_wide (cst)); })
           /* Last resort, use some unsigned type.  */
           (with { tree utype = unsigned_type_for (type); }
-           (view_convert (inner_op
-                          (view_convert:utype @0)
-                          (view_convert:utype
-                           { drop_tree_overflow (cst); })))))))))))))
+           (if (utype)
+            (view_convert (inner_op
+                           (view_convert:utype @0)
+                           (view_convert:utype
+                            { drop_tree_overflow (cst); }))))))))))))))

   /* (CST1 - A) +- CST2 -> CST3 - A  */
   (for outer_op (plus minus)
so that it is easily backportable and then we can discuss if we want
unsigned_type_for to support complex integer types or not.

Reply via email to