https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117630
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >GCC still fails to optimise away such empty destructors (this has been >reported some years ago) and generates useless atexit() entries for them. No it was just fixed this year for GCC 15, See PR 19661 .