libstdc++: Avoid bogus warning in std::vector::insert [PR107852]

GCC assumes that any global variable might be modified by operator new,
and so in the testcase for this PR all data members get reloaded after
allocating new storage. By making local copies of the _M_start and
_M_finish members we avoid that, and then the compiler has enough info
to remove the dead branches that trigger bogus -Warray-bounds warnings.

libstdc++-v3/ChangeLog:

	PR libstdc++/107852
	PR libstdc++/106199
	PR libstdc++/100366
	* include/bits/vector.tcc (vector::_M_fill_insert): Copy
	_M_start and _M_finish members before allocating.
	(vector::_M_default_append): Likewise.
	(vector::_M_range_insert): Likewise.
1 file changed