This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/26726] -fivopts producing out of bounds array refs
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2006 12:55:58 -0000
- Subject: [Bug tree-optimization/26726] -fivopts producing out of bounds array refs
- References: <bug-26726-12049@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2006-03-17 12:55 -------
For your warning patch another option is to simply only warn in either the
first or the second VRP pass, not in the third which is the only one run after
loop optimizations. Also you could ignore ADDR_EXPR (ARRAY_REF (...)) as these
are
not reading/writing to the memory. Instead for
D.1234_2 = &a[i];
*D.1234_2 = j;
warn at the point of the INDIRECT_REF and lookup the DEF for D.1234_2 to
check if it is defined as &ARRAY_REF (...)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26726