https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67422
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > memcpy is not guaranteed to work if the memory locations for a and b overlap, > which could be the case here. In Fortran code, they cannot be the same location and if they are then it is undefined code.