PR libstdc++/64140
	Backport form mainline
	2014-12-04  Tim Shen  <timshen@google.com>

	* include/bits/regex.tcc (regex_iterator<>::operator++): Update
	prefix.matched after modifying prefix.first.
	* testsuite/28_regex/iterators/regex_iterator/char/64140.cc: New
	testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@218445 138bc75d-0d04-0410-961f-82ee72b054a4