The following valid code snippet causes an ICE on mainline when compiled with "-O":
================================== struct A { int i[6]; A () : i() {} }; struct B { A a; B(const A& x) : a(x) {} }; B b=A(); ================================== bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)': bug.cc:13: internal compiler error: in sra_hash_tree, at tree-sra.c:383 Please submit a full bug report, [etc.] This seems to be a recent regression (within the last week). The problem might be related to PR 18793. -- Summary: [4.0 regression] ICE initializing arrays Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, monitored Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19108