Browse Source

*** empty log message ***

florian 25 years ago
parent
commit
099f13ec92
2 changed files with 27 additions and 0 deletions
  1. 1 0
      tests/testopt/readme.txt
  2. 26 0
      tests/testopt/testreg1.pp

+ 1 - 0
tests/testopt/readme.txt

@@ -0,0 +1 @@
+This directory contains some tests which test the optimizer

+ 26 - 0
tests/testopt/testreg1.pp

@@ -0,0 +1,26 @@
+{$minenumsize 1}
+
+
+type
+   tenum = (e1,e2,e3);
+
+procedure p1(e : tenum);forward;
+
+procedure p1;
+
+  begin
+     e:=tenum(byte(e)*byte(e));
+     case e of
+        e1 : ;
+     else
+       begin
+          writeln('error');
+          halt(1);
+       end;
+     end;
+  end;
+
+begin
+   p1(e1);
+end.
+