This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/81705] [8 Regression] UBSAN: yet another false positive
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 Aug 2017 08:20:56 +0000
- Subject: [Bug middle-end/81705] [8 Regression] UBSAN: yet another false positive
- Auto-submitted: auto-generated
- References: <bug-81705-4@http.gcc.gnu.org/bugzilla/>
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;
}