[Bug tree-optimization/19108] [4.0/4.1 regression] ICE initializing arrays

rth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Mar 28 19:13:00 GMT 2005


------- Additional Comments From rth at gcc dot gnu dot org  2005-03-28 19:13 -------
Indeed, SRA *does* need to be updated to handle the RANGE_EXPR.  And not in the
hash routine at all -- it needs to happen before that.  Consider the following
modified test case:

struct A
{
    int i[6];
    A () : i(1) {}
};

struct B
{
    A a;
    B(const A& x) : a(x) {}
};

B b=A();

int main()
{
  return b.a.i[0] == 1 ? 0 : 1;
}

Steven, if you don't have time to work on this, reassign the bug to me.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19108



More information about the Gcc-bugs mailing list