* new bugs

This commit is contained in:
peter 2004-10-25 14:47:32 +00:00
parent c87d51dfef
commit 4b4d9ecbf2
4 changed files with 116 additions and 0 deletions

41
tests/webtbf/tw3364.pp Normal file
View File

@ -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: netsurfer@au.ru }
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
tests/webtbs/tw3328.pp Normal file
View File

@ -0,0 +1,27 @@
{ Source provided for Free Pascal Bug Report 3328 }
{ Submitted by "Christian Iversen" on 2004-09-21 }
{ e-mail: chrivers@iversen-net.dk }
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
tests/webtbs/tw3348.pp Normal file
View File

@ -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
tests/webtbs/tw3366.pp Normal file
View File

@ -0,0 +1,24 @@
{ %opt=-Sc }
{ Source provided for Free Pascal Bug Report 3366 }
{ Submitted by "Sergey Kosarevsky" on 2004-10-22 }
{ e-mail: netsurfer@au.ru }
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.