mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-18 18:31:41 +02:00
+ 204,205 CVS:
---------------------------------------------------------------------- readme.txt CVS: Added Files: CVS: bug0204.pp bug0205.pp CVS: ----------------------------------------------------------------------
This commit is contained in:
parent
55640c751c
commit
a53d748739
@ -1,4 +1,4 @@
|
||||
{ Compile with -Rintel switch }
|
||||
{$asmmode intel}
|
||||
var
|
||||
l : longint;
|
||||
begin
|
||||
@ -6,6 +6,7 @@ begin
|
||||
{ relative to stack, and the parser thinks all wrong }
|
||||
{ because of this. }
|
||||
asm
|
||||
mov eax, [eax*4+l]
|
||||
lea eax,[eax*4+eax]
|
||||
mov eax,[eax*4+l]
|
||||
end;
|
||||
end.
|
||||
end.
|
||||
|
5
bugs/bug0204.pp
Normal file
5
bugs/bug0204.pp
Normal file
@ -0,0 +1,5 @@
|
||||
var
|
||||
b : boolean;
|
||||
begin
|
||||
byte(b):=1;
|
||||
end.
|
31
bugs/bug0205.pp
Normal file
31
bugs/bug0205.pp
Normal file
@ -0,0 +1,31 @@
|
||||
program bug_show;
|
||||
{ By PAV (pavsoft@usa.net) }
|
||||
|
||||
function bad_uppercase(s:string):string;
|
||||
var i:integer;
|
||||
begin
|
||||
for i:=1 to length(s) do
|
||||
if (ord(s[i])>=97 and ord(s[i])<=122) then s[i]:=chr(ord(s[i])-97+65);
|
||||
bad_uppercase:=s;
|
||||
end;
|
||||
|
||||
function good_uppercase(s:string):string;
|
||||
var i:integer;
|
||||
begin
|
||||
for i:=1 to length(s) do
|
||||
if (ord(s[i])>=97) and (ord(s[i])<=122) then s[i]:=chr(ord(s[i])-97+65);
|
||||
good_uppercase:=s;
|
||||
end;
|
||||
|
||||
const cadena='Free Paskal Compiler 0.99.8 !!! (bug)';
|
||||
begin
|
||||
writeln('This is the original string before convert it');
|
||||
writeln(cadena);
|
||||
writeln();
|
||||
writeln('This is a bad result, using "if ( and )"');
|
||||
writeln(bad_uppercase(cadena));
|
||||
writeln();
|
||||
writeln('This is a good result, using "if () and ()"');
|
||||
writeln(good_uppercase(cadena));
|
||||
writeln();
|
||||
end.
|
@ -267,3 +267,5 @@ bug0198.pp calling specifications aren't allowed in class declarations,
|
||||
bug0200.pp array of char overloading problem with strings
|
||||
bug0202.pp flag results not supported with case
|
||||
bug0203.pp problem with changed mangledname of procedures after use
|
||||
bug0204.pp can typecast the result var in an assignment
|
||||
bug0205.pp and parsing bug, generates wrong code (tp7 gives parser error)
|
||||
|
Loading…
Reference in New Issue
Block a user