[Bug middle-end/52355] [4.7 regression] address difference between array elements is not considered to be a compile time constant anymore
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 24 11:16:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52355
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-24 11:14:24 UTC ---
Author: rguenth
Date: Fri Feb 24 11:14:17 2012
New Revision: 184548
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184548
Log:
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.
Added:
trunk/gcc/testsuite/gcc.dg/pr52355.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list