------- 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
