瀏覽代碼

* new bugs

peter 21 年之前
父節點
當前提交
4df316465e
共有 6 個文件被更改,包括 136 次插入4 次删除
  1. 23 0
      tests/webtbs/tw3218.pp
  2. 5 4
      tests/webtbs/tw3227.pp
  3. 33 0
      tests/webtbs/tw3327.pp
  4. 32 0
      tests/webtbs/tw3334.pp
  5. 18 0
      tests/webtbs/tw3340.pp
  6. 25 0
      tests/webtbs/uw3340.pp

+ 23 - 0
tests/webtbs/tw3218.pp

@@ -0,0 +1,23 @@
+{ Source provided for Free Pascal Bug Report 3218 }
+{ Submitted by "Vincent Snijders" on  2004-07-20 }
+{ e-mail: [email protected] }
+{$mode objfpc}
+
+uses
+  classes;
+  
+type TAProc = procedure(const s: string; o: TObject);
+var AProc: TAProc;
+procedure A(const s: string; c: TComponent);
+begin
+  c.Name := s;
+end;
+
+var
+  o1: TObject;
+begin
+  AProc:=@A; //this line should generate an error
+  o1 := TObject.Create;
+  AProc('',o1);
+end.
+

+ 5 - 4
tests/webtbs/tw3227.pp

@@ -1,8 +1,8 @@
 { Source provided for Free Pascal Bug Report 3227 }
 { Submitted by "mickaël leduque" on  2004-08-03 }
 { e-mail: [email protected] }
-uses variants;
-
+uses Variants;
+ 
 
 type
   TGffVarType		= (
@@ -66,7 +66,7 @@ type
 
 
 
-
+ 
 
 var	FType : TGffVarType;
 
@@ -124,6 +124,7 @@ FType:=gffBYTE;
 
   end;
 
-end;
+end.
+
 
 

+ 33 - 0
tests/webtbs/tw3327.pp

@@ -0,0 +1,33 @@
+{ Source provided for Free Pascal Bug Report 3327 }
+{ Submitted by "Andreas Dorn" on  2004-09-21 }
+{ e-mail: [email protected] }
+
+Program BugReport;
+
+Type Type1 = Record
+               a: Word;
+               b: LongWord;
+     End;
+
+Type Type2 = Record
+               a: Word;
+               b: LongWord;
+               c: Array[0..1024] Of Char;
+     End;
+
+Type Type3 = Record
+               a: Word;
+               b: LongWord;
+               c: Array[0..1024] Of LongWord;
+     End;
+
+Var One: Array [1..100000] Of Type1;
+    Two: Type2;
+    Three: Type3 absolute two;
+    Four: Type1 absolute Three;
+Begin;
+  One[1].a:=12;
+  Four := One[1];
+  if Four.a<>12 then
+    halt(1);
+End.

+ 32 - 0
tests/webtbs/tw3334.pp

@@ -0,0 +1,32 @@
+{ Source provided for Free Pascal Bug Report 3334 }
+{ Submitted by "Martin Schreiber" on  2004-09-28 }
+{ e-mail:  }
+program project1;
+
+{$mode objfpc}{$H+}
+
+uses
+  Classes;
+
+procedure p1;  
+type
+ integerarty = array of integer;
+var
+ ar1,ar2: integerarty;
+begin
+ setlength(ar1,4);
+ ar2:= copy(ar1,1,2);
+end;
+
+var
+ mem1,mem2 : longint;
+begin
+  mem1:=heapsize-memavail;
+  p1;
+  mem2:=heapsize-memavail;
+  writeln(mem1,' - ',mem2);
+  if mem1<>mem2 then
+    halt(1);
+end.
+
+

+ 18 - 0
tests/webtbs/tw3340.pp

@@ -0,0 +1,18 @@
+{ Source provided for Free Pascal Bug Report 3340 }
+{ Submitted by "Alexey Barkovoy" on  2004-10-05 }
+{ e-mail: [email protected] }
+program Project1;
+{$APPTYPE CONSOLE}
+{$MODE DELPHI}
+{$INLINE ON}
+uses
+  uw3340;
+
+var
+  t: TTT;
+begin
+  t:= TTT.Create;
+  t.zz:= 9;
+  WriteLn(t.Yes);
+  t.Free;
+end.

+ 25 - 0
tests/webtbs/uw3340.pp

@@ -0,0 +1,25 @@
+unit uw3340;
+interface
+{$MODE DELPHI}
+{$INLINE ON}
+
+type
+  TTT = class
+  public
+    zz: Integer;
+  public
+    function Yes: Integer; inline;
+  end;
+
+implementation
+
+procedure LocK; inline;
+begin WriteLn('asdfasdf'); end;
+
+function TTT.Yes: Integer;
+begin
+  Lock;
+  Result:= zz;
+end;
+
+end.