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 middle-end/81705] [8 Regression] UBSAN: yet another false positive


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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Oops.  Simple mistake in my recent patch.

Index: gcc/fold-const.c
===================================================================
--- gcc/fold-const.c    (revision 250865)
+++ gcc/fold-const.c    (working copy)
@@ -9629,7 +9629,9 @@ fold_binary_loc (location_t loc,
              else if ((var0 && minus_var1
                        && ! operand_equal_p (var0, minus_var1, 0))
                       || (minus_var0 && var1
-                          && ! operand_equal_p (minus_var0, var1, 0)))
+                          && ! operand_equal_p (minus_var0, var1, 0))
+                      || (minus_var0 && minus_var1
+                          && ! operand_equal_p (minus_var0, minus_var1, 0)))
                ok = false;
            }

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