re PR tree-optimization/48694 (possible memory hog bug)
authorRichard Guenther <rguenther@suse.de>
Tue, 26 Apr 2011 09:21:44 +0000 (09:21 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 26 Apr 2011 09:21:44 +0000 (09:21 +0000)
commitad0e2567d69760fa7156ef24418b4d10f99def6a
tree8ff4c2719e2c23a082193dd49ef8d3a607ac33e4
parent0d467c0bf219265a40b0cfe284092ec5382d4b1a
re PR tree-optimization/48694 (possible memory hog bug)

2011-04-26  Richard Guenther  <rguenther@suse.de>

PR middle-end/48694
* tree.h (OEP_CONSTANT_ADDRESS_OF): New operand_equal_flag.
* fold-const.c (operand_equal_p): For TREE_CONSTANT ADDR_EXPRs
compare the operands with OEP_CONSTANT_ADDRESS_OF.  Treat
trees with TREE_SIDE_EFFECTS equal when OEP_CONSTANT_ADDRESS_OF
is set.

* gcc.dg/torture/pr48694-1.c: New testcase.
* gcc.dg/torture/pr48694-2.c: Likewise.

From-SVN: r172954
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr48694-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr48694-2.c [new file with mode: 0644]
gcc/tree.h