From: Gaius Mulley Date: Tue, 19 Nov 2024 19:33:18 +0000 (+0000) Subject: [PATCH] PR modula2/115164 initial test code highlighting the problem X-Git-Tag: releases/gcc-14.3.0~855 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aefb47144465c620141daf46e0ce576a5b0a389e;p=thirdparty%2Fgcc.git [PATCH] 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. (cherry picked from commit d642b66a298ece7394e786a6a2d14a4f0b561d9a) 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 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.