https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81973
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |link-failure Ever confirmed|0 |1 Last reconfirmed| |2021-12-22 Status|UNCONFIRMED |NEW Summary|Aliased virtual methods are |alias virtual function does |treated as undefined, so |not cause the vtable to be |the vtable is not generated |emitted even if the aliased | |function is defined in the | |TU --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. Note GCC (since 8) does warn about the types being different now: <source>:14:22: warning: 'void s::g()' alias between functions of incompatible types 'void (s::)()' and 'void(s*)' [-Wattribute-alias=] 14 | void g() __attribute__ ((alias ("s_g_alias"))); | ^ <source>:25:14: note: aliased declaration here 25 | void s_g_alias(s* this_){ | ^~~~~~~~~