Browse Source

* new bugs

pierre 26 years ago
parent
commit
7ee9e0d2cc
5 changed files with 52 additions and 2 deletions
  1. 1 0
      bugs/bug0175.pp
  2. 15 1
      bugs/bug0207.pp
  3. 10 0
      bugs/bug0210.pp
  4. 24 0
      bugs/bug0211.pp
  5. 2 1
      bugs/readme.txt

+ 1 - 0
bugs/bug0175.pp

@@ -1,3 +1,4 @@
+{$asmmode att}
 var
 var
   w : word;
   w : word;
 begin
 begin

+ 15 - 1
bugs/bug0207.pp

@@ -1,5 +1,19 @@
 {$mode delphi}
 {$mode delphi}
 
 
+type
+   tmyobject = class(tobject)
+	procedure free;
+    end;
+
+   procedure tmyobject.free;
+     begin
+        if self<>nil then
+          destroy;
+     end; 
+
+   var t : tmyobject;
 begin
 begin
-   while true do tobject.create.free;
+   t:=tmyobject.create;
+   t.destroy;
+   while true do tmyobject.create.free;
 end.
 end.

+ 10 - 0
bugs/bug0210.pp

@@ -0,0 +1,10 @@
+{ boolean args are accepted for fillchar in BP }
+
+program test;
+
+  var l : array[1..10] of boolean;
+
+begin
+   fillchar(l,sizeof(l),true);
+end.
+

+ 24 - 0
bugs/bug0211.pp

@@ -0,0 +1,24 @@
+var
+   a,b : boolean;
+   c : byte;
+   i : longint;
+
+procedure Error;
+begin
+   Writeln('Error in bug0211');
+   Halt(1);
+end;
+
+begin
+  c:=5;
+  a:=boolean(c);
+  if a and not a then
+    Begin
+       Writeln('FPC is crazy !!');
+       Error;
+    End;
+  i:=256;
+  a:=boolean(i);
+  Writeln('boolean(256) =',a);
+end.
+  

+ 2 - 1
bugs/readme.txt

@@ -244,6 +244,7 @@ Fixed bugs:
   bug0209.pp   problem with boolean expressions of different store sizes
   bug0209.pp   problem with boolean expressions of different store sizes
                (problem created while solving bug205 ! PM)          OK 0.99.11 (PM)
                (problem created while solving bug205 ! PM)          OK 0.99.11 (PM)
   bug0207.pp   a class destructor doesn't release the memory        OK 0.99.11 (FK) 
   bug0207.pp   a class destructor doesn't release the memory        OK 0.99.11 (FK) 
+  bug0210.pp   fillchar should accept boolean value also !!         OK 0.99.11 (PM)
 
 
 Unproducable bugs:
 Unproducable bugs:
 ------------------
 ------------------
@@ -282,4 +283,4 @@ bug0200.pp   array of char overloading problem with strings
 bug0201.pp   problem with record var-parameters and assembler
 bug0201.pp   problem with record var-parameters and assembler
 bug0202.pp   flag results not supported with case
 bug0202.pp   flag results not supported with case
 bug0206.pp   sets with variable ranges doesn't work
 bug0206.pp   sets with variable ranges doesn't work
-
+bug0211.pp   a and not a is true !!! (if a:=boolean(5))