Pārlūkot izejas kodu

+ 142,143,144,145

peter 27 gadi atpakaļ
vecāks
revīzija
3474cf1a60
5 mainītis faili ar 77 papildinājumiem un 0 dzēšanām
  1. 13 0
      bugs/bug0142.pp
  2. 11 0
      bugs/bug0143.pp
  3. 21 0
      bugs/bug0144.pp
  4. 27 0
      bugs/bug0145.pp
  5. 5 0
      bugs/readme.txt

+ 13 - 0
bugs/bug0142.pp

@@ -0,0 +1,13 @@
+
+{$PACKRECORDS 1}
+
+type
+Time = object
+  h,m,s:byte;
+end;
+
+var OT:Time;
+ l : longint;
+begin
+  l:=SizeOf(OT);
+end.

+ 11 - 0
bugs/bug0143.pp

@@ -0,0 +1,11 @@
+
+
+const
+  string1 : string = 'hello ';
+  string2 : array[1..5] of char = 'there';
+var
+  s : string;
+begin
+  s:=string1+string2;
+  writeln(string1+string2);
+end.

+ 21 - 0
bugs/bug0144.pp

@@ -0,0 +1,21 @@
+program done_bug;
+
+type
+TObject = object
+  Constructor Init;
+  Destructor Done;
+end;
+PObject = ^TObject;
+
+Constructor TObject.Init;
+begin end;
+Destructor TObject.Done;
+begin end;
+
+var P:PObject;
+
+begin
+New(P,Init);
+with P^ do Done; { Compiler PANIC here ! }
+Dispose(P);
+end.

+ 27 - 0
bugs/bug0145.pp

@@ -0,0 +1,27 @@
+{$I+}
+const
+  Mb=512;
+  siz=1024*Mb;
+
+type
+  buf=array[1..siz] of byte;
+
+var
+  fin,
+  fout : file of buf;
+  b1,a1 : buf;
+
+begin
+  fillchar(a1,sizeof(a1),1);
+  assign(fout,'tmp.tmp');
+  rewrite(fout);
+  write(fout,a1);
+  close(fout);
+
+  assign(fin,'tmp.tmp');
+  reset(fin);
+  read(fin,b1);
+  close(fin);
+  if not b1[512*Mb]=1 then
+   writeln('data err');
+end.

+ 5 - 0
bugs/readme.txt

@@ -190,3 +190,8 @@ bug0135.pp   Unsupported subrange type construction.
 bug0137.pp   Cannot assign child object variable to parent objcet type variable
 bug0139.pp   Cannot access protected method of ancestor class from other unit.
 bug0141.pp   Wrong Class sizes when using forwardly defined classes.
+bug0142.pp   sizeof(object) is not tp7 compatible when no constructor is used
+bug0143.pp   cannot concat string and array of char in $X+ mode
+bug0144.pp   problem with 'with object do'
+bug0145.pp   typed files with huges records (needs filerec.size:longint)
+