]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR middle-end/52355 (address difference between array elements is not considered...
authorRichard Guenther <rguenther@suse.de>
Fri, 24 Feb 2012 11:14:17 +0000 (11:14 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 24 Feb 2012 11:14:17 +0000 (11:14 +0000)
commitbf948210a7cc658d936ecc4e9e9a5c206336217c
tree634770809467c4c208098c20ed3d91b8f8ba01c0
parentbc8da6ba25c77f0dc7da0fd37b10119a42a0d532
re PR middle-end/52355 (address difference between array elements is not considered to be a compile time constant anymore)

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.

From-SVN: r184548
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr52355.c [new file with mode: 0644]