1. code below compiles into many instructions like "movl $0, 16(%eax)", should have been "stosw" since all initializations are zeros. Even if one or two are skipped in the middle still bulk stosw should be used. 2. Even when class E with external constructor uncommented this shouldn't change since constructor can't change any data in C.
Yuri ----code---- class E { // int j; public: E(); }; class C { int h, i, j, k, l; // E e; int m, n, o, p, q, r, s, t, u, v; public: C(); }; C::C() : h(0), i(0), j(), k(0), l(0), m(0), n(0), o(0), p(0), q(0), r(0), s(0), t(0), u(0), v(0) { } -- Summary: suboptimal constructor generated Product: gcc Version: 3.4.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: yuri at tsoft dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19726