https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103387
--- Comment #13 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #9) > The _M_num_put cache exists to avoid doing the RTTI check implied by > use_facet every time we use the stream. But that RTTI check has been removed > for GCC 13 anyway. Since the cached facet is the cause of this bug, we can > just ignore it for powercp64le when we support two forms of long double. I've backported this to gcc-12, but we don't have the optimization to make std::use_facet faster on gcc-12 (and it requires new exported symbols, so can't be backported). That means there's a performance hit for those iostream ops on gcc-12 now. But they don't segfault! Maybe I should look into a powerpc64le-specific change to avoid that performance hit on the branch. Or maybe only avoid the cached facet when outputting an __ieee128, as that's when the cached facet is not usable.