https://gcc.gnu.org/g:d642b66a298ece7394e786a6a2d14a4f0b561d9a
commit r15-700-gd642b66a298ece7394e786a6a2d14a4f0b561d9a Author: Gaius Mulley <gaiusm...@gmail.com> Date: Tue May 21 01:11:48 2024 +0100 PR modula2/115164 initial test code highlighting the problem This patch includes some trivial testcode which highlights PR 115164. Expect future test code to perform runtime checks for a series of trailing zeros. gcc/testsuite/ChangeLog: PR modula2/115164 * gm2/isolib/run/pass/testlowread.mod: New test. * gm2/isolib/run/pass/testwritereal.mod: New test. Signed-off-by: Gaius Mulley <gaiusm...@gmail.com> Diff: --- gcc/testsuite/gm2/isolib/run/pass/testlowread.mod | 9 +++++++++ gcc/testsuite/gm2/isolib/run/pass/testwritereal.mod | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/gcc/testsuite/gm2/isolib/run/pass/testlowread.mod b/gcc/testsuite/gm2/isolib/run/pass/testlowread.mod new file mode 100644 index 000000000000..fefbcb0b3720 --- /dev/null +++ b/gcc/testsuite/gm2/isolib/run/pass/testlowread.mod @@ -0,0 +1,9 @@ +MODULE testlowread ; + +FROM LowReal IMPORT places ; +FROM STextIO IMPORT WriteString, WriteLn ; +FROM SWholeIO IMPORT WriteCard ; + +BEGIN + WriteString ('value of places = ') ; WriteCard (places, 0) ; WriteLn +END testlowread. diff --git a/gcc/testsuite/gm2/isolib/run/pass/testwritereal.mod b/gcc/testsuite/gm2/isolib/run/pass/testwritereal.mod new file mode 100644 index 000000000000..025d684175c5 --- /dev/null +++ b/gcc/testsuite/gm2/isolib/run/pass/testwritereal.mod @@ -0,0 +1,9 @@ +MODULE testwritereal ; + +FROM STextIO IMPORT WriteString, WriteLn ; +FROM SRealIO IMPORT WriteFloat ; +FROM RealMath IMPORT pi ; + +BEGIN + WriteString ('value of pi = ') ; WriteFloat (pi, 0, 0) ; WriteLn +END testwritereal.