Browse Source

+ tbug735 tbug760

pierre 26 years ago
parent
commit
1c7d0390cc
2 changed files with 58 additions and 0 deletions
  1. 26 0
      tests/webtbs/tbug735.pp
  2. 32 0
      tests/webtbs/tbug760.pp

+ 26 - 0
tests/webtbs/tbug735.pp

@@ -0,0 +1,26 @@
+{$asmmode intel}
+
+procedure DoIt;
+begin
+  Writeln('DoIt was called');
+end;
+
+const
+  CB : word = 5;
+
+procedure A(B: word); assembler; inline;
+asm
+   MOV  AX,B
+   CMP  AX,[CB]
+   JZ   @OK
+   CLI
+   MOV  [CB],AX
+   STI
+   CALL DoIt
+@OK:      { <-- creates labels with same name }
+end;
+
+begin
+   A(5);
+   A(8);
+end.

+ 32 - 0
tests/webtbs/tbug760.pp

@@ -0,0 +1,32 @@
+type TElement = object
+      constructor Init;
+      {something}
+      destructor Free; virtual;
+      destructor Done; virtual;
+     end;
+
+constructor TElement.Init;
+begin
+  Writeln('Init called');
+end;
+
+destructor TElement.free;
+begin
+  Writeln('Free used');
+end;
+
+destructor TElement.Done;
+begin
+  Writeln('Done used');
+end;
+
+var
+  E : TElement;
+  PE : ^TElement;
+
+begin
+  E.init;
+  E.Free;
+  new(PE,init);
+  dispose(PE,Done);
+end.