https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70139
--- Comment #2 from Viktor Ostashevskyi <ostash at ostash dot kiev.ua> --- Exception occurs, because in: regex_traits::lookup_classname(...): { ... static const pair<const char*, char_class_type> __classnames[] = { {"d", ctype_base::digit}, {"w", {ctype_base::alnum, _RegexMask::_S_under}}, {"s", ctype_base::space}, {"alnum", ctype_base::alnum}, {"alpha", ctype_base::alpha}, {"blank", ctype_base::blank}, {"cntrl", ctype_base::cntrl}, {"digit", ctype_base::digit}, {"graph", ctype_base::graph}, {"lower", ctype_base::lower}, {"print", ctype_base::print}, {"punct", ctype_base::punct}, {"space", ctype_base::space}, {"upper", ctype_base::upper}, {"xdigit", ctype_base::xdigit}, }; ... } array element for "w" class is initialized to {0, 0} with -fno-ellide-constructors.