OSDN Git Service

2012-02-24 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Feb 2012 11:14:17 +0000 (11:14 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 24 Feb 2012 11:14:17 +0000 (11:14 +0000)
commit7dd5914023b6a64362a22c9a9b47e05ff71e26f0
tree634770809467c4c208098c20ed3d91b8f8ba01c0
parented000476d0b0562da82c677e6091a0e489a12ee9
2012-02-24  Richard Guenther  <rguenther@suse.de>

PR middle-end/52355
* fold-const.c (fold_addr_of_array_ref_difference): New function.
(fold_binary_loc): Use it to extend the existing &a[i] - &a[j]
folding.

* gcc.dg/pr52355.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184548 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr52355.c [new file with mode: 0644]