https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100827
Bug ID: 100827 Summary: Compiler crash with Boost.Bimap and Boost.Xpressive Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pdimov at gmail dot com Target Milestone: --- I'm seeing a compiler crash with g++ 10/11 in -std=c++03 mode https://godbolt.org/z/h4dY9oKGc https://godbolt.org/z/o1P6nrhqG when compiling one file from the Boost.Bimap test suite: ``` #include <boost/config.hpp> #include <string> #include <boost/bimap/bimap.hpp> #include <boost/xpressive/xpressive.hpp> #include <boost/xpressive/regex_actions.hpp> using namespace boost::bimaps; using namespace boost::xpressive; namespace xp = boost::xpressive; int main() { //[ code_bimap_and_boost_xpressive typedef bimap< std::string, int > bm_type; bm_type bm; std::string rel_str("one <--> 1 two <--> 2 three <--> 3"); sregex rel = ( (s1= +_w) >> " <--> " >> (s2= +_d) ) [ xp::ref(bm)->*insert( xp::construct<bm_type::value_type>(s1, as<int>(s2)) ) ]; sregex relations = rel >> *(+_s >> rel); regex_match(rel_str, relations); assert( bm.size() == 3 ); //] return 0; } ``` (https://github.com/boostorg/bimap/blob/03bf1d222914d0c15563414f2e51b6a4ce0e0f69/example/bimap_and_boost/xpressive.cpp) Trunk no longer has the issue, and neither do earlier versions or language modes. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94938 looks related, but is considered fixed in GCC 10.