------- Additional Comments From reichelt at gcc dot gnu dot org 2004-10-26 09:18 ------- Andrew's example in comment #26 is broken. ret.cd is set to 2 and therefore we have a.b.cd!=1 which triggers the abort.
Nevertheless, here's a reduced testcase derived from comment #25: ================================ void abort(void); typedef struct { int i; } A; A foo(void) { A a = { 1 }; int j; for (j=0; j<2; j++) ; return a; } void bar(A *p) { *p = foo(); } int main(void) { A a; bar(&a); if (a.i != 1) abort(); return 0; } ================================ -- What |Removed |Added ---------------------------------------------------------------------------- CC| |reichelt at gcc dot gnu dot | |org Keywords| |monitored http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17526