https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106369
--- Comment #5 from Hannes Hauswedell <h2+bugs at fsfe dot org> --- I have found a workaround for my code: template <typename derived_type, auto size> -class aminoacid_base : public alphabet_base<derived_type, size, char>, public aminoacid_empty_base +class aminoacid_base : public aminoacid_empty_base, public alphabet_base<derived_type, size, char> This change prevents the bug from triggering. Maybe that helps in pinning it down?