* new bugs

This commit is contained in:
peter 2004-02-24 17:13:26 +00:00
parent 3b98ec6944
commit 0a73341f54
5 changed files with 110 additions and 12 deletions

28
tests/webtbs/tw2944.pp Normal file
View File

@ -0,0 +1,28 @@
{ Source provided for Free Pascal Bug Report 2944 }
{ Submitted by "marco (gory bugs department)" on 2004-02-06 }
{ e-mail: }
{$ifdef fpc}{$mode Delphi}{$endif}
type
WS2StubEntry = record
StubProc : Pointer;
ProcVar : PPointer;
Name : PChar;
end;
LPFN_WSACLEANUP = function : Integer; stdcall;
var WSACleanup : LPFN_WSACLEANUP;
procedure WS2Stub_WSACleanup;
begin
end;
CONST
WS2StubEntryCount = 1;
WS2StubTable : Array [0..WS2StubEntryCount-1] of WS2StubEntry = (
(StubProc: @WS2Stub_WSACleanup; ProcVar: @@WSACleanup; Name: 'WSACleanup'));
begin
end.

15
tests/webtbs/tw2949.pp Normal file
View File

@ -0,0 +1,15 @@
{ Source provided for Free Pascal Bug Report 2949 }
{ Submitted by "Marco (Gory bugs department)" on 2004-02-07 }
{ e-mail: }
{$ifdef fpc}{$mode Delphi}{$endif}
TYPE
// dummy types
PSSL_CTX=pchar;
var
IdSslCtxSetVerifyDepth : procedure(ctx: PSSL_CTX; depth: Integer); cdecl = nil;
begin
end.

View File

@ -1,12 +0,0 @@
{ %fail }
{ Source provided for Free Pascal Bug Report 2972 }
{ Submitted by "Michalis Kamburelis" on 2004-02-13 }
{ e-mail: michalis@camelot.homedns.org }
type
TEnum = (one, two);
var s:String;
begin
s:=one;
end.

16
tests/webtbs/tw2975.pp Normal file
View File

@ -0,0 +1,16 @@
{ Source provided for Free Pascal Bug Report 2975 }
{ Submitted by "Michalis Kamburelis" on 2004-02-15 }
{ e-mail: michalis@camelot.homedns.org }
procedure p;
const
t:array[0..0]of AnsiString = ('blah');
begin
Writeln('''', t[0], '''');
if t[0]='' then
halt(1);
end;
begin
p;
p;
end.

51
tests/webtbs/tw2976.pp Normal file
View File

@ -0,0 +1,51 @@
{ Source provided for Free Pascal Bug Report 2976 }
{ Submitted by "Soeren Haastrup" on 2004-02-17 }
{ e-mail: haastrupsoeren@hotmail.com }
Type vector=array[1..2] of double;
pair=record
v1:double;
v2:vector;
end;
operator := (x:double) r:pair;
var i:longint;
Begin
r.v1:=x;
for i:=1 to 2 do r.v2[i]:=0;
End;
{
operator + (x:double;p:pair) r:pair; // Marked
var i:longint;
Begin
r.v1:=x+p.v1;
for i:=1 to 2 do r.v2[i]:=p.v2[i];
End;
}
operator + (p:pair;x:double) r:pair;
var i:longint;
Begin
r.v1:=p.v1+x;
for i:=1 to 2 do r.v2[i]:=p.v2[i];
End;
operator + (p1,p2:pair) r:pair;
var i:longint;
Begin
r.v1:=p1.v1+p2.v1;
for i:=1 to 2 do r.v2[i]:=p1.v2[i]+p2.v2[i];
End;
var a,b:pair;
Begin //main
a:=2; //ok
b:=a+a; //ok
a:=2+b; // ups?
End.