aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2023-11-24 17:59:44 +0100
committerJan Hubicka <jh@suse.cz>2023-11-24 17:59:44 +0100
commitc2dcfb6ba6e9a84a16e63ae73a822ae2a843170c (patch)
treee80683756dda462e6d2e33e44934a75b8ae5c856 /libstdc++-v3
parentaae723d360ca26cd9fd0b039fb0a616bd0eae363 (diff)
downloadgcc-c2dcfb6ba6e9a84a16e63ae73a822ae2a843170c.zip
gcc-c2dcfb6ba6e9a84a16e63ae73a822ae2a843170c.tar.gz
gcc-c2dcfb6ba6e9a84a16e63ae73a822ae2a843170c.tar.bz2
Use memcpy instead of memmove in __relocate_a_1
__relocate_a_1 is used to copy data after vector reizing. This can be done by memcpy rather than memmove. libstdc++-v3/ChangeLog: PR middle-end/109849 * include/bits/stl_uninitialized.h (__relocate_a_1): Use memcpy instead of memmove.
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/include/bits/stl_uninitialized.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/stl_uninitialized.h b/libstdc++-v3/include/bits/stl_uninitialized.h
index 1282af3..a9b8027 100644
--- a/libstdc++-v3/include/bits/stl_uninitialized.h
+++ b/libstdc++-v3/include/bits/stl_uninitialized.h
@@ -1119,14 +1119,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#ifdef __cpp_lib_is_constant_evaluated
if (std::is_constant_evaluated())
{
- // Can't use memmove. Wrap the pointer so that __relocate_a_1
+ // Can't use memcpu. Wrap the pointer so that __relocate_a_1
// resolves to the non-trivial overload above.
__gnu_cxx::__normal_iterator<_Tp*, void> __out(__result);
__out = std::__relocate_a_1(__first, __last, __out, __alloc);
return __out.base();
}
#endif
- __builtin_memmove(__result, __first, __count * sizeof(_Tp));
+ __builtin_memcpy(__result, __first, __count * sizeof(_Tp));
}
return __result + __count;
}