[Bug libstdc++/114817] Wrong codegen for std::copy of "trivially copyable but not trivially assignable" type

2024-04-26 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114817 --- Comment #3 from Arthur O'Dwyer --- https://github.com/boostorg/container/issues/153 , from 2020, is another similar issue. There, boost::container::vector had assumed that if __has_trivial_copy(T) and is_copy_constructible_v, then T could

[Bug libstdc++/114817] Wrong codegen for std::copy of "trivially copyable but not trivially assignable" type

2024-04-23 Thread de34 at live dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114817 Jiang An changed: What|Removed |Added CC||de34 at live dot cn --- Comment #2 from

[Bug libstdc++/114817] Wrong codegen for std::copy of "trivially copyable but not trivially assignable" type

2024-04-23 Thread arthur.j.odwyer at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114817 --- Comment #1 from Arthur O'Dwyer --- Yes, vector reallocation has analogous trouble with types that are "trivial, but not trivially copy constructible." https://godbolt.org/z/Psboqf3MP (libc++ happens to sidestep this pitfall *on Clang 15+,*