The following code ICEs at -O1 (this comes from <http://gcc.gnu.org/ml/gcc/2005-02/ msg00294.html>: struct test { int *x; } global_test; int global_int;
int flag; void test (char *dummy) { static const struct test const_test = { &global_int }; struct test local_test; int i; for (i = 0; i < 1; i++) *dummy = 0; if (flag) __builtin_memset (dummy, 0, 16); local_test = const_test; global_test = local_test; } -- Summary: [4.0 Regression] ICE with address in struct assignment Product: gcc Version: 4.0.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: critical Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: powerpc-darwin http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19853