[patch, libfortran] Fix PR 80365, undefined memcpy
Thomas Koenig
tkoenig@netcologne.de
Sun Jul 23 19:23:00 GMT 2017
Hello world,
the attached test cases fixes a problematic invocation of
memcpy where src=NULL and n=0 by simply doing nothing
in the surrounding function if there is nothing to be done.
No test case, because this only shows up with a sanitized
libgfortran or under a debugger.
OK for trunk?
Regards
Thomas
2017-07-23 Thomas Koenig <tkoenig@gcc.gnu.org>
* io/unix.c (buf_write): Return early if there is
nothing to write.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 349 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20170723/fde6753f/attachment.bin>
More information about the Fortran
mailing list