Take: struct g { inline g(void); int t; }; inline g::g(void) { t = 0; }
int h(void) { g a; return a.t; } --- CUT --- g::g() is being emitted even at -O2 -fno-early-inlining even though it has been inlined. Note we either update the cgraph after early inlining or it updates it correctly. -- Summary: [4.5 Regression] inlined comdat function sometimes is emitted Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41735