https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110572
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- This is the fix I'm suggesting: --- a/libstdc++-v3/libsupc++/typeinfo +++ b/libstdc++-v3/libsupc++/typeinfo @@ -188,6 +188,9 @@ namespace std #endif #if __GXX_TYPEINFO_EQUALITY_INLINE || __cplusplus > 202002L +# if ! __GXX_TYPEINFO_EQUALITY_INLINE + [[__gnu__::__always_inline__]] +# endif _GLIBCXX23_CONSTEXPR inline bool type_info::operator==(const type_info& __arg) const _GLIBCXX_NOEXCEPT {