This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/67422] memcpy incorrectly used to copy (potentially) overlapping assumed-size arrays
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Sep 2015 13:10:18 +0000
- Subject: [Bug fortran/67422] memcpy incorrectly used to copy (potentially) overlapping assumed-size arrays
- Auto-submitted: auto-generated
- References: <bug-67422-4 at http dot gcc dot gnu dot org/bugzilla/>
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.