https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68863
--- Comment #2 from Tim Shen <timshen at gcc dot gnu.org> --- Author: timshen Date: Tue Dec 15 04:50:29 2015 New Revision: 231641 URL: https://gcc.gnu.org/viewcvs?rev=231641&root=gcc&view=rev Log: PR libstdc++/68863 * include/bits/regex_executor.tcc (_Executor::_M_lookahead): Copy the captured content for lookahead, so that the backreferences inside can refer to them. * testsuite/28_regex/algorithms/regex_match/ecma/char/68863.cc: New testcase. Added: trunk/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/ecma/char/68863.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/regex_executor.tcc