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 13:17:02 -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 #5 from rguenth at gcc dot gnu dot org 2006-03-17 13:17 -------
Simpler testcase:
struct Foo {
Foo() : s(1) {}
int s;
};
void foo(Foo&);
void bar(void)
{
Foo x[4];
foo(x[0]);
}
<bb 0>:
ivtmp.34 = &x[1];
<L0>:;
D.1822 = (int *) &x[0];
D.1825 = -&x;
MEM[base: D.1822 + (int *) ivtmp.34, index: (int *) D.1825, offset: -4B] = 1;
ivtmp.34 = ivtmp.34 + 4B;
if (ivtmp.34 != &x[5]) goto <L0>; else goto <L2>;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26726