https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94810
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- There isn't, there's a segfault in your program. That is caused by assuming that the global streams have been constructed already, when it is clearly documented that the construction order is unspecified.