https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71874
Bug ID: 71874 Summary: memmove works wrong Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sudakov_ivan at mail dot ru Target Milestone: --- Created attachment 38896 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38896&action=edit Code to reproduce bug Environment: uname -a Linux 4.1.13-100.fc21.x86_64 #1 SMP Tue Nov 10 13:13:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux g++ --version g++ (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6) Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. How to reproduce: 1. Compile code: g++ memmove_bug.cpp (example from here: http://www.cplusplus.com/reference/cstring/memmove/). File in attachment. 2. Run. Expected result: memmove can be very useful...... memmove can be very very useful. actual result: memmove can be very useful...... memmove can be very very usey u.