Browse Source

* new bugs

peter 21 năm trước cách đây
mục cha
commit
4b4d9ecbf2
4 tập tin đã thay đổi với 116 bổ sung0 xóa
  1. 41 0
      tests/webtbf/tw3364.pp
  2. 27 0
      tests/webtbs/tw3328.pp
  3. 24 0
      tests/webtbs/tw3348.pp
  4. 24 0
      tests/webtbs/tw3366.pp

+ 41 - 0
tests/webtbf/tw3364.pp

@@ -0,0 +1,41 @@
+{ %fail }
+{ %opt=-Sew }
+
+{ Source provided for Free Pascal Bug Report 3364 }
+{ Submitted by "Sergey Kosarevsky" on  2004-10-22 }
+{ e-mail: [email protected] }
+Type pMyObject1 = ^tMyObject1;
+     tMyObject1 = Object
+        Constructor Init;
+        Destructor Done;
+        Procedure MyProc;Virtual;Abstract;
+     End;
+
+Type pMyObject2 = ^tMyObject2;
+     tMyObject2 = Object(tMyObject1)
+        Constructor Init;
+        Procedure MyProc;Virtual;
+     End;
+
+Constructor tMyObject1.Init;
+Begin
+End;
+
+Destructor tMyObject1.Done;
+Begin
+End;
+
+Constructor tMyObject2.Init;
+Begin
+End;
+
+Procedure tMyObject2.MyProc;
+Begin
+End;
+
+Var T:pMyObject1;
+
+Begin
+   T:=New(pMyObject2, Init);
+   Dispose(T,Done);
+End.

+ 27 - 0
tests/webtbs/tw3328.pp

@@ -0,0 +1,27 @@
+{ Source provided for Free Pascal Bug Report 3328 }
+{ Submitted by "Christian Iversen" on  2004-09-21 }
+{ e-mail: [email protected] }
+program fpcdelphi;
+
+var
+  err : boolean;
+
+Function A(Const S1, S2: PAnsiChar): Integer; Overload;
+Begin
+  writeln('pansichar overload');
+  err:=false;
+End;
+
+Function A(Const S1, S2: AnsiString): Integer; Overload;
+Begin
+  writeln('ansistring overload');
+End;
+
+Var
+  X : PAnsiChar;
+Begin
+  err:=true;
+  A(X, '');
+  if err then
+    halt(1);
+End.

+ 24 - 0
tests/webtbs/tw3348.pp

@@ -0,0 +1,24 @@
+{ %opt=-ghcl }
+
+{ Source provided for Free Pascal Bug Report 3348 }
+{ Submitted by "Martin Schreiber" on  2004-10-10 }
+{ e-mail:  }
+program project1;
+
+{$mode objfpc}{$H+}
+// compile with -gh -gc -gl
+uses
+  Classes;
+type
+ integerarty = array of integer;
+
+procedure proc(ar: array of integer);
+begin
+end;
+
+var
+ ar1: integerarty;
+begin
+ ar1:= nil;
+ proc(ar1); // checkpointer error (nil!)
+end.

+ 24 - 0
tests/webtbs/tw3366.pp

@@ -0,0 +1,24 @@
+{ %opt=-Sc }
+
+{ Source provided for Free Pascal Bug Report 3366 }
+{ Submitted by "Sergey Kosarevsky" on  2004-10-22 }
+{ e-mail: [email protected] }
+Type tVector3=Array[1..3] Of Single;
+
+Operator * (A:tVector3;B:Single) R:tVector3;
+Var I:Longint;
+Begin
+   For I:=1 To 3 Do R[I]:=A[I]*B;
+
+   Exit(R);
+End;
+
+Var A:tVector3;
+
+Begin
+   A[1]:=1;
+   A[2]:=1;
+   A[3]:=1;
+
+   A*=2;
+End.