The following valid code snippet fails to compile on mainline when compiled with "-O":
======================================= struct A { virtual A* foo(); }; struct B : virtual A { virtual B* foo() { return 0; } }; B b; ======================================= bug.cc:11: error: 'B* *.LTHUNK1()' aliased to undefined symbol '_ZTch0_v0_n32_N1B3fooEv' -- Summary: [4.4 regression] Trouble with covariant return Product: gcc Version: 4.4.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37095