https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118811
--- Comment #23 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:99f57446e63b8ebeaeeae8dc48981cd5f1dfb831 commit r15-7645-g99f57446e63b8ebeaeeae8dc48981cd5f1dfb831 Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Feb 12 17:29:59 2025 +0000 libstdc++: Use init_priority attribute for tzdb globals [PR118811] When linking statically to libstdc++.a (or to libstdc++_nonshared.a in the RHEL devtoolset compiler) there's a static initialization order problem where user code might be constructed before the std::chrono::tzdb_list globals, and so might try to use them after they've already been destroyed. Use the init_priority attribute on those globals so that they are initialized early. Since r15-7511-g4e7f74225116e7 we can disable the warnings for using a reserved priority using a diagnostic pragma. libstdc++-v3/ChangeLog: PR libstdc++/118811 * src/c++20/tzdb.cc (tzdb_list::_Node): Use init_priority attribute on static data members. * testsuite/std/time/tzdb_list/pr118811.cc: New test.