[Bug modula2/110631] Bug in FIO.WriteCardinal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110631 --- Comment #5 from CVS Commits --- The releases/gcc-13 branch has been updated by Gaius Mulley : https://gcc.gnu.org/g:d1611c51dd7ce054eceb19fda3be72c2164aaa71 commit r13-7658-gd1611c51dd7ce054eceb19fda3be72c2164aaa71 Author: Gaius Mulley Date: Sun Jul 30 21:44:49 2023 +0100 PR modula2/110631 Bugfix to FIO WriteCardinal FIO.WriteCardinal fails to write binary data. This patch fixes two bugs in FIO.mod and provides a testcase which writes and reads binary cardinals. There was an off by one error when using HIGH (a) to determine the number of bytes and the dest/src pointers were switched when calling memcpy. gcc/m2/ChangeLog: PR modula2/110631 * gm2-libs/FIO.def (ReadAny): Correct comment as HIGH (a) + 1 is number of bytes. (WriteAny): Correct comment as HIGH (a) + 1 is number of bytes. * gm2-libs/FIO.mod (ReadAny): Correct comment as HIGH (a) + 1 is number of bytes. Also pass HIGH (a) + 1 to BufferedRead. (WriteAny): Correct comment as HIGH (a) + 1 is number of bytes. Also pass HIGH (a) + 1 to BufferedWrite. (BufferedWrite): Rename parameter a to src, rename variable t to dest. Correct parameter order to memcpy. gcc/testsuite/ChangeLog: PR modula2/110631 * gm2/pimlib/run/pass/testfiobinary.mod: New test. (cherry picked from commit 73cc6ce1294ec35e9322b1bbc91009cfc76f732b) Signed-off-by: Gaius Mulley
[Bug modula2/110631] Bug in FIO.WriteCardinal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110631 Gaius Mulley changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #4 from Gaius Mulley --- Closing now that the patch has been applied.
[Bug modula2/110631] Bug in FIO.WriteCardinal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110631 --- Comment #3 from CVS Commits --- The master branch has been updated by Gaius Mulley : https://gcc.gnu.org/g:73cc6ce1294ec35e9322b1bbc91009cfc76f732b commit r14-2725-g73cc6ce1294ec35e9322b1bbc91009cfc76f732b Author: Gaius Mulley Date: Sat Jul 22 10:01:02 2023 +0100 PR modula2/110631 Bugfix to FIO WriteCardinal FIO.WriteCardinal fails to write binary data. This patch fixes two bugs in FIO.mod and provides a testcase which writes and reads binary cardinals. There was an off by one error when using HIGH (a) to determine the number of bytes and the dest/src pointers were switched when calling memcpy. gcc/m2/ChangeLog: PR modula2/110631 * gm2-libs/FIO.def (ReadAny): Correct comment as HIGH (a) + 1 is number of bytes. (WriteAny): Correct comment as HIGH (a) + 1 is number of bytes. * gm2-libs/FIO.mod (ReadAny): Correct comment as HIGH (a) + 1 is number of bytes. Also pass HIGH (a) + 1 to BufferedRead. (WriteAny): Correct comment as HIGH (a) + 1 is number of bytes. Also pass HIGH (a) + 1 to BufferedWrite. (BufferedWrite): Rename parameter a to src, rename variable t to dest. Correct parameter order to memcpy. gcc/testsuite/ChangeLog: PR modula2/110631 * gm2/pimlib/run/pass/testfiobinary.mod: New test. Signed-off-by: Gaius Mulley
[Bug modula2/110631] Bug in FIO.WriteCardinal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110631 --- Comment #2 from Gaius Mulley --- Created attachment 55600 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55600=edit Proposed fix Here is a proposed fix - which will be applied (if/when) bootstrapping completes successfully.
[Bug modula2/110631] Bug in FIO.WriteCardinal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110631 Gaius Mulley changed: What|Removed |Added Last reconfirmed||2023-07-11 Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED --- Comment #1 from Gaius Mulley --- Confirmed and reproduced.