Browse Source

*** empty log message ***

florian 25 years ago
parent
commit
e6f4922ad6
4 changed files with 53 additions and 1 deletions
  1. 3 0
      tests/testopt/readme.txt
  2. 1 1
      tests/testopt/testreg1.pp
  3. 7 0
      tests/testopt/testreg2.dat
  4. 42 0
      tests/testopt/testreg2.pp

+ 3 - 0
tests/testopt/readme.txt

@@ -1 +1,4 @@
 This directory contains some tests which test the optimizer
+Register variables:
+  Enumerations .......................... testreg1.pp
+  Readln ................................ testreg2.pp

+ 1 - 1
tests/testopt/testreg1.pp

@@ -1,6 +1,6 @@
+{$OPT=-Or}
 {$minenumsize 1}
 
-
 type
    tenum = (e1,e2,e3);
 

+ 7 - 0
tests/testopt/testreg2.dat

@@ -0,0 +1,7 @@
+1.0
+2.0
+3.0
+4.0
+5.0
+6.0
+

+ 42 - 0
tests/testopt/testreg2.pp

@@ -0,0 +1,42 @@
+{$OPT=-Or}
+{$maxfpuregisters 3}
+uses
+   dotest;
+
+var
+   t : text;
+
+procedure p;
+
+  var
+     d : double;
+     e : extended;
+     s : single;
+
+  begin
+     readln(t,d);
+     if d<>1 then
+       do_error(1000);
+     readln(t,d);
+     if d<>2 then
+       do_error(1001);
+     readln(t,e);
+     if e<>3 then
+       do_error(1002);
+     readln(t,e);
+     if e<>4 then
+       do_error(1003);
+     readln(t,s);
+     if s<>5 then
+       do_error(1004);
+     readln(t,s);
+     if s<>6 then
+       do_error(1005);
+  end;
+
+begin
+   assign(t,'testreg2.dat');
+   reset(t);
+   p;
+   close(t);
+end.