2015-03-09 Richard Biener <rguenther@suse.de>
commite48f86feecfc0eb3ed30a296f09014aa4ba976bc
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Mar 2015 13:54:28 +0000 (9 13:54 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Mar 2015 13:54:28 +0000 (9 13:54 +0000)
tree08c44e058e8dabba9e5cd87ddd2f888817f638da
parent44933aa713f6635fc9004a7998fc9186611e49af
2015-03-09  Richard Biener  <rguenther@suse.de>

PR middle-end/65270
* tree-core.h (enum operand_equal_flag): Add OEP_ADDRESS_OF.
* fold-const.c (operand_equal_p): When recursing for ADDR_EXPRs
operand set OEP_ADDRESS_OF.  Clear it when recursing to non-bases
of that.  When comparing dereferences compare alignment.
When comparing MEM_REFs or TARGET_MEM_REFs compare dependence info.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221281 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr65270-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr65270-2.c [new file with mode: 0644]
gcc/tree-core.h