id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 2655,pure virtual function called under gcc -O2,eherbst@…,Eric Niebler,"The following code results in a pure virtual function call under gcc-4.3.0 20080428 (red hat 4.3.0-8) with -O2 but not with -O1. The innermost non-error-handling stack frame gdb shows is boost::xpressive::detail::end_matcher::match<__gnu_cxx::__normal_iterator, boost::xpressive::detail::no_next> at boost/xpressive/detail/core/flow_control.hpp:64. --- #include #include #include using std::string; namespace xpr = boost::xpressive; int main() { string text = ""at""; xpr::sregex r1 = xpr::as_xpr('a'), r2 = 'b' >> r1, r3 = r2 | r1; xpr::regex_replace(text, r3, string("""")); return 0; } --- The problem goes away if I do any one of these: - switch the order of the alternation - replace 'r1' in the definition of r3 with xpr::as_xpr('a') - replace 'r2' in the definition of r3 with ('b' >> r1) - match to a string not starting with 'a' It does not go away if I do one of these: - change the 'b' in r2 to 'a' - stick a by_ref() around r1 in the definition of r2 Any ideas? Thank you.",Support Requests,closed,Boost 1.38.0,xpressive,Boost 1.37.0,Problem,fixed,,