mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 20:30:55 +02:00
* new bugs
* added $mode fpc
This commit is contained in:
parent
8aabe05dbe
commit
594c8943eb
@ -1,3 +1,5 @@
|
|||||||
|
{$mode fpc}
|
||||||
|
|
||||||
var
|
var
|
||||||
s : ansistring;
|
s : ansistring;
|
||||||
ss : shortstring;
|
ss : shortstring;
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
program Test;
|
{$mode fpc}
|
||||||
|
|
||||||
operator :=(x:LongInt)RESULT:ShortString;
|
operator :=(x:LongInt)RESULT:ShortString;
|
||||||
begin
|
begin
|
||||||
Val(RESULT,x);
|
Val(RESULT,x);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
s:ShortString;
|
s:ShortString;
|
||||||
begin
|
begin
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
Program test_operator;
|
Program test_operator;
|
||||||
|
|
||||||
|
{$mode fpc}
|
||||||
|
|
||||||
type
|
type
|
||||||
Vector = record
|
Vector = record
|
||||||
X,Y,Z : extended;
|
X,Y,Z : extended;
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
{ e-mail: layton@brandom.com }
|
{ e-mail: layton@brandom.com }
|
||||||
unit tw2109;
|
unit tw2109;
|
||||||
|
|
||||||
|
{$mode fpc}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
{ warning!!! -- pascal re-generates every result in an operator statement }
|
{ warning!!! -- pascal re-generates every result in an operator statement }
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
{$mode fpc}
|
||||||
|
|
||||||
var
|
var
|
||||||
err : boolean;
|
err : boolean;
|
||||||
|
|
||||||
|
25
tests/webtbs/tw3863.pp
Normal file
25
tests/webtbs/tw3863.pp
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{ %cpu=i386 }
|
||||||
|
|
||||||
|
{ Source provided for Free Pascal Bug Report 3863 }
|
||||||
|
{ Submitted by "Jernej" on 2005-04-01 }
|
||||||
|
{ e-mail: jernejcoder@gmail.com }
|
||||||
|
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
function FormatBuf(var Buffer; BufLen: Cardinal; const Format;
|
||||||
|
FmtLen: Cardinal; const Args: array of const): Cardinal;
|
||||||
|
asm
|
||||||
|
CMP EAX,Args.Integer[-4] // -> "error building record offset"
|
||||||
|
CMP [EBX+EAX*8].Byte[4],vtInteger // -> error: assembler error in operand
|
||||||
|
CMP EBX,Args.Integer[-4] // -> "error building record offset"
|
||||||
|
MOVZX EBX,[ESI].Byte[4] // -> error: assembler error in operand
|
||||||
|
JMP @CvtVector.Pointer[EBX*4] // "error: assembler syntax error"
|
||||||
|
@CvtVector:
|
||||||
|
DD 0
|
||||||
|
DD 0
|
||||||
|
DD 0
|
||||||
|
DD 0
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
19
tests/webtbs/tw3864.pp
Normal file
19
tests/webtbs/tw3864.pp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 3864 }
|
||||||
|
{ Submitted by "Jernej" on 2005-04-01 }
|
||||||
|
{ e-mail: jernejcoder@gmail.com }
|
||||||
|
const
|
||||||
|
rasteriso: array[0..2] of byte = // this is WAY too big
|
||||||
|
(
|
||||||
|
$00, $00, $00
|
||||||
|
);
|
||||||
|
|
||||||
|
procedure glBitMap(const pb:pbyte);cdecl;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
i : longint;
|
||||||
|
begin
|
||||||
|
i:=0;
|
||||||
|
glBitmap(@rasteriso[(255 - i) * 16]); // Add a character to the current Display list
|
||||||
|
end.
|
20
tests/webtbs/tw3865.pp
Normal file
20
tests/webtbs/tw3865.pp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 3865 }
|
||||||
|
{ Submitted by "Jernej" on 2005-04-01 }
|
||||||
|
{ e-mail: jernejcoder@gmail.com }
|
||||||
|
uses
|
||||||
|
SysUtils;
|
||||||
|
|
||||||
|
procedure wantitchars(const text: string; var wot: array of char);
|
||||||
|
begin
|
||||||
|
fillchar(wot, sizeof(wot), 0);
|
||||||
|
StrPCopy(wot, text); // FPC ERROR: incompatible type for arg no. 1: got "array of char", expected "pchar"
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
a : array[0..10] of char;
|
||||||
|
begin
|
||||||
|
wantitchars('test',a);
|
||||||
|
writeln(a);
|
||||||
|
if a<>'test' then
|
||||||
|
halt(1);
|
||||||
|
end.
|
22
tests/webtbs/tw3870.pp
Normal file
22
tests/webtbs/tw3870.pp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 3870 }
|
||||||
|
{ Submitted by "Tom Verhoeff" on 2005-04-04 }
|
||||||
|
{ e-mail: T.Verhoeff@tue.nl }
|
||||||
|
program AssertFormatBug;
|
||||||
|
{ Illustrates bug with using Format in Assert }
|
||||||
|
|
||||||
|
{$assertions on}
|
||||||
|
|
||||||
|
uses
|
||||||
|
SysUtils { for IntToStr, Format };
|
||||||
|
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
Assert(False, IntToStr(2)); { incorrectly raises EAccessViolation }
|
||||||
|
except
|
||||||
|
on E: EAssertionFailed do
|
||||||
|
begin
|
||||||
|
Writeln('Caught Assert: ',E.Message);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user