mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 22:50:21 +02:00
+ several bug files added
This commit is contained in:
parent
e25d934e2f
commit
823e429c3a
2
bugs/1.pas
Normal file
2
bugs/1.pas
Normal file
@ -0,0 +1,2 @@
|
||||
begin
|
||||
end.
|
@ -6,6 +6,7 @@ var s: String;
|
||||
i: integer;
|
||||
code: word;
|
||||
e: 0..10;
|
||||
enum : (a,b,c,d);
|
||||
|
||||
Begin
|
||||
{$R-}
|
||||
@ -27,4 +28,8 @@ Begin
|
||||
s := '65535';
|
||||
val(s, i, code); {must give a range check error}
|
||||
Writeln('Val range check failed!');
|
||||
|
||||
{ val must also handle enums }
|
||||
s:='2';
|
||||
val(s, enum, code);
|
||||
End.
|
||||
|
11
bugs/bug0222.pp
Normal file
11
bugs/bug0222.pp
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
type TStruct = record
|
||||
x,y: Integer;
|
||||
end;
|
||||
|
||||
var i: TStruct;
|
||||
|
||||
begin
|
||||
for i.x:=1 to 10 do
|
||||
writeln(i.x);
|
||||
end.
|
10
bugs/bug0223.pp
Normal file
10
bugs/bug0223.pp
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
var a:string;
|
||||
|
||||
begin
|
||||
writeln('B:'='B:'); { debbuger evaluates this to FALSE }
|
||||
|
||||
a:='A:';
|
||||
inc(a[1]);
|
||||
writeln(a='B:'); { TRUE }
|
||||
end.
|
12
bugs/bug0224.pp
Normal file
12
bugs/bug0224.pp
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
var f:text;
|
||||
i:integer;
|
||||
begin
|
||||
assign(f,'bug0224.txt');
|
||||
reset(f);
|
||||
{$I-}
|
||||
readln(f,i); { you can't avoid run-time error generation }
|
||||
{$I+}
|
||||
if IOResult<>0 then writeln('error...')
|
||||
else close(f);
|
||||
end.
|
1
bugs/bug0224.txt
Normal file
1
bugs/bug0224.txt
Normal file
@ -0,0 +1 @@
|
||||
|
@ -299,4 +299,8 @@ bug0218.pp rounding errors with write/str (the bug is fixed, but there
|
||||
value PFV)
|
||||
bug0220.pp can't choose overload with array of char
|
||||
bug0221.pp syntax parsing incompatibilities with tp7
|
||||
|
||||
1.pp produces a linker error under win32, sorry for the filename
|
||||
but the filename is the bug :)
|
||||
bug0222.pp an record field can't be the counter index (compiles with TP)
|
||||
bug0223.pp wrong boolean evaluation in writeln
|
||||
bug0224.pp I/O-Error generation in readln can't be switched off
|
||||
|
Loading…
Reference in New Issue
Block a user