commit d514c81a7965fd24b9d8c294b12179b2369c8aa4 Author: Kyrylo Tkachov Date: Tue Jul 21 10:18:31 2015 +0100 [match.pd] Restrict -(A + B) -> (-B) - A to integral or float types diff --git a/gcc/match.pd b/gcc/match.pd index 3d7b32e..29367f2 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -515,7 +515,8 @@ along with GCC; see the file COPYING3. If not see /* -(A + B) -> (-B) - A. */ (simplify (negate (plus:c @0 negate_expr_p@1)) - (if (!HONOR_SIGN_DEPENDENT_ROUNDING (element_mode (type)) + (if ((FLOAT_TYPE_P (type) || INTEGRAL_TYPE_P (type)) + && !HONOR_SIGN_DEPENDENT_ROUNDING (element_mode (type)) && !HONOR_SIGNED_ZEROS (element_mode (type))) (minus (negate @1) @0)))