Browse Source

- 201,206
+ 217-221

peter 26 years ago
parent
commit
b6f3ac45bf
7 changed files with 83 additions and 3 deletions
  1. 5 1
      bugs/bug0201.pp
  2. 18 0
      bugs/bug0217.pp
  3. 21 0
      bugs/bug0218.pp
  4. 13 0
      bugs/bug0219.pp
  5. 9 0
      bugs/bug0220.pp
  6. 7 0
      bugs/bug0221.pp
  7. 10 2
      bugs/readme.txt

+ 5 - 1
bugs/bug0201.pp

@@ -1,11 +1,14 @@
 program bug0201;
 
+{$asmmode att}
+
 type rec = record
          a : DWord;
          b : Word;
      end;
 
-function x(r1 : rec; r2 : rec; var r3 : rec); assembler;
+procedure x(r1 : rec; r2 : rec; var r3 : rec);
+begin
 asm
    movl r3, %edi
    
@@ -17,6 +20,7 @@ asm
    addw r2.b, %cx
    movw %cx, rec.b(%edi)
 end;
+end;
 
 var r1, r2, r3 : rec;
 

+ 18 - 0
bugs/bug0217.pp

@@ -0,0 +1,18 @@
+{$ifdef fpc}{$mode tp}{$endif}
+
+type tmpproc=function:longint;
+
+function a:longint;{$ifndef fpc}far;{$endif}
+begin
+ a:=-1;
+end;
+
+procedure tmp(a: tmpproc);
+begin
+  writeln(a);           { "Cannot read/write variables of this type", TP kan dit
+wel? }
+end;
+
+begin
+  tmp(a);               { de TP manier , in FPC moet dit zijn tmp(@a); }
+end.

+ 21 - 0
bugs/bug0218.pp

@@ -0,0 +1,21 @@
+Program Wrong_Output;
+{}
+Var r:Extended; s:String;
+{}
+Begin
+  Writeln('Size of Extended type (r)=',SizeOf(r),' bytes');
+  r:=0.000058184639;
+  Writeln('r=',r);
+  Writeln('r=',r:16:13);
+  Writeln('r=',r:15:12);
+  Writeln('r=',r:14:11);
+  Writeln('r=',r:13:10);
+  Writeln('r=',r:12:9);
+  Writeln('r=',r:11:8);
+  Writeln('r=',r:10:7);
+  Writeln('r=',r:9:6);
+  Writeln('r=',r:8:5);
+  Writeln('r=',r:7:4);
+  Str(r:7:4,s);
+  Writeln('r=',s,' (as string)')
+End.

+ 13 - 0
bugs/bug0219.pp

@@ -0,0 +1,13 @@
+{ Should give '(' expected in line 6 }
+
+   const
+     replaces=4;
+     replacetab : array[1..replaces,1..2] of string[32]=(
+       ':',' or colon',
+       'mem8','mem or bits8',
+       'mem16','mem or bits16',
+       'mem32','mem or bits32'
+     )
+begin
+end.
+

+ 9 - 0
bugs/bug0220.pp

@@ -0,0 +1,9 @@
+type
+  a = array[0..100] of char;
+
+var
+  a1 : a;
+  s : string;
+begin
+  s:=Copy(a1,1,10);
+end.

+ 7 - 0
bugs/bug0221.pp

@@ -0,0 +1,7 @@
+var
+  r : double;
+  c : char;
+begin
+  r:=1.;
+  c:=^.; { this compile in tp7, c should contain 'n'/#110 }
+end.

+ 10 - 2
bugs/readme.txt

@@ -241,10 +241,12 @@ Fixed bugs:
   bug0197.pp   should produce an error: problem with c1:=c2<c3 where c? is OK 0.99.11 (PM)
                a comp type
   bug0199.pp   bug in mul code                                       OK 0.99.11  (FK)
+  bug0201.pp   problem with record var-parameters and assembler      OK 0.99.11 (PFV)
   bug0203.pp   problem with changed mangledname of procedures after use
                Generates an error now				     OK 0.99.11 (PM)
   bug0204.pp   can typecast the result var in an assignment          OK 0.99.11 (PM)
   bug0205.pp   and parsing bug, generates wrong code (tp7 gives parser error) OK 0.99.11 (PM)
+  bug0206.pp   sets with variable ranges doesn't work                OK 0.99.11 (PFV)
   bug0207.pp   a class destructor doesn't release the memory        OK 0.99.11 (FK) 
   bug0208.pp   implicit conversion from boolean to longint should not be allowed
                (this is the reason of bug0205 !)                    OK 0.99.11 (PM)
@@ -288,7 +290,13 @@ bug0185.pp   missing range checking for Val and subrange types
 bug0198.pp   calling specifications aren't allowed in class declarations,
              this should be allowed
 bug0200.pp   array of char overloading problem with strings
-bug0201.pp   problem with record var-parameters and assembler
 bug0202.pp   flag results not supported with case
-bug0206.pp   sets with variable ranges doesn't work
 bug0212.pp   problem with properties
+bug0217.pp   in tp mode can't use the procvar in writeln
+bug0218.pp   rounding errors with write/str (the bug is fixed, but there
+             is still some rounding error left when writing the extended
+             value PFV)
+bug0219.pp   wrong error message
+bug0220.pp   can't choose overload with array of char
+bug0221.pp   syntax parsing incompatibilities with tp7
+