From: Gaius Mulley Date: Tue, 21 May 2024 00:11:48 +0000 (+0100) Subject: PR modula2/115164 initial test code highlighting the problem X-Git-Tag: basepoints/gcc-16~8853 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d642b66a298ece7394e786a6a2d14a4f0b561d9a;p=thirdparty%2Fgcc.git 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 --- 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 00000000000..fefbcb0b372 --- /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 00000000000..025d684175c --- /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.