https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105876
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- const std::string MAIN_EXTERN_CONST_STRING= "a_literal_string_value"; ... static const std::string TEST_STATIC_CONST_STRING = MAIN_EXTERN_CONST_STRING; MAIN_EXTERN_CONST_STRING is still dynamic intialized since the constructor of std::string is non-consteval (well that is the C++20 term, for pre-C++20, it is non-constexpr and non-trival).