aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Shen <timshen91@gmail.com>2013-10-03 20:54:01 +0000
committerTim Shen <timshen@gcc.gnu.org>2013-10-03 20:54:01 +0000
commit468146e0b5ff30e5a635be524a73f0dd46ffc27f (patch)
tree5e5f7a4e31ca551d3693e46c3385c9d6776e2101
parentd358f348689fe3026f7096c66c23ce4a5f68e766 (diff)
downloadgcc-468146e0b5ff30e5a635be524a73f0dd46ffc27f.zip
gcc-468146e0b5ff30e5a635be524a73f0dd46ffc27f.tar.gz
gcc-468146e0b5ff30e5a635be524a73f0dd46ffc27f.tar.bz2
regex_executor.tcc (_DFSExecutor<>::_M_dfs): Fix wrong backup variable initialization.
2013-10-03 Tim Shen <timshen91@gmail.com> * include/bits/regex_executor.tcc (_DFSExecutor<>::_M_dfs): Fix wrong backup variable initialization. From-SVN: r203190
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/bits/regex_executor.tcc2
2 files changed, 6 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 896bc6e..b02593a 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-03 Tim Shen <timshen91@gmail.com>
+
+ * include/bits/regex_executor.tcc (_DFSExecutor<>::_M_dfs): Fix wrong
+ backup variable initialization.
+
2013-10-03 John Woolverton <jdwoolverton@gmail.com>
PR libstdc++/58604
diff --git a/libstdc++-v3/include/bits/regex_executor.tcc b/libstdc++-v3/include/bits/regex_executor.tcc
index 3a40800..60ba952 100644
--- a/libstdc++-v3/include/bits/regex_executor.tcc
+++ b/libstdc++-v3/include/bits/regex_executor.tcc
@@ -66,7 +66,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if (!_M_cur_results[__state._M_subexpr].matched
|| _M_cur_results[__state._M_subexpr].first != __current)
{
- auto __back = __current;
+ auto __back = _M_cur_results[__state._M_subexpr].first;
_M_cur_results[__state._M_subexpr].first = __current;
__ret = _M_dfs(__state._M_next);
_M_cur_results[__state._M_subexpr].first = __back;