Browse Source

check for 890 and 892

pierre 25 years ago
parent
commit
7a861f6f57
3 changed files with 66 additions and 3 deletions
  1. 19 0
      tests/webtbf/tbug890.pp
  2. 29 3
      tests/webtbs/tbug890.pp
  3. 18 0
      tests/webtbs/tbug892.pp

+ 19 - 0
tests/webtbf/tbug890.pp

@@ -0,0 +1,19 @@
+{$ifdef FPC}
+  {$MODE TP}
+{$endif FPC}
+
+unit tbug890;
+
+INTERFACE
+
+procedure GetScreenLine(const x: Integer);
+
+IMPLEMENTATION
+
+
+procedure GetScreenLine(x: Integer);
+begin
+end;
+
+begin
+end.

+ 29 - 3
tests/webtbs/tbug890.pp

@@ -1,4 +1,6 @@
-{$MODE TP }
+{$ifdef FPC}
+  {$MODE TP}
+{$endif FPC}
 
 unit tbug890;
 
@@ -6,11 +8,35 @@ INTERFACE
 
 procedure GetScreenLine(const x: Integer);
 
+function dummy(const x : integer) : integer;
+function dummy2(var x : integer) : integer;
+function dummystr(x : integer) : string;
+
 IMPLEMENTATION
 
-procedure GetScreenLine(x: Integer);
+
+procedure GetScreenLine;
+begin
+end;
+
+function dummy2;
+begin
+  dummy2:=x;
+  x:=0;
+end;
+
+function dummystr;
+var
+  s : string;
+begin
+  str(x,s);
+  dummystr:=s;
+end;
+
+{ this one is refused by BP :( }
+function dummy : integer;
 begin
- x:=5;
+  dummy:=x;
 end;
 
 begin

+ 18 - 0
tests/webtbs/tbug892.pp

@@ -0,0 +1,18 @@
+
+
+{$asmmode intel}
+
+var
+  i,j  : longint;
+
+begin
+  i:=56;
+  { this should work as ss and ds have the same selector value }
+  asm
+    segss
+    mov eax,dword ptr [i]
+    mov dword ptr [j],eax
+  end;
+  if i<>j then
+    Halt(1);
+end.