Commit 05ca5990 by Gavin Romig-Koch Committed by Gavin Romig-Koch

* fold-const.c (operand_equal_p): Pay attention to side effects.

From-SVN: r29483
parent 3f94eee6
Fri Sep 17 15:05:27 1999 Gavin Romig-Koch <gavin@cygnus.com>
* fold-const.c (operand_equal_p): Pay attention to side effects.
Fri Sep 17 11:14:17 1999 Jason Merrill <jason@yorick.cygnus.com>
* libgcc2.c (L_exit): Check for ON_EXIT, not HAVE_ON_EXIT.
......
......@@ -2183,6 +2183,12 @@ operand_equal_p (arg0, arg1, only_const)
TREE_OPERAND (arg1, 0), 0));
case 'r':
/* If either of the pointer (or reference) expressions we are dereferencing
contain a side effect, these cannot be equal. */
if (TREE_SIDE_EFFECTS (arg0)
|| TREE_SIDE_EFFECTS (arg1))
return 0;
switch (TREE_CODE (arg0))
{
case INDIRECT_REF:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment