[Bug c/86617] [6/7/8/9 Regression] Volatile qualifier is ignored sometimes for unsigned char
bernd.edlinger at hotmail dot de
gcc-bugzilla@gcc.gnu.org
Sun Jul 22 17:07:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86617
Bernd Edlinger <bernd.edlinger at hotmail dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bernd.edlinger at hotmail dot de
--- Comment #2 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
Oh, interesting:
Index: genmatch.c
===================================================================
--- genmatch.c (revision 262904)
+++ genmatch.c (working copy)
@@ -2748,12 +2748,14 @@
char match_opname[20];
match_dop->get_name (match_opname);
if (value_match)
- fprintf_indent (f, indent, "if (%s == %s || operand_equal_p (%s, %s,
0))\n",
- opname, match_opname, opname, match_opname);
+ fprintf_indent (f, indent, "if ((%s == %s && ! TREE_SIDE_EFFECTS (%s)) "
+ "|| operand_equal_p (%s, %s, 0))\n",
+ opname, match_opname, opname, opname, match_opname);
else
- fprintf_indent (f, indent, "if (%s == %s || (operand_equal_p (%s, %s, 0) "
+ fprintf_indent (f, indent, "if ((%s == %s && ! TREE_SIDE_EFFECTS (%s)) "
+ "|| (operand_equal_p (%s, %s, 0) "
"&& types_match (%s, %s)))\n",
- opname, match_opname, opname, match_opname,
+ opname, match_opname, opname, opname, match_opname,
opname, match_opname);
fprintf_indent (f, indent + 2, "{\n");
return 1;
More information about the Gcc-bugs
mailing list