Browse Source

* new bugs
* added $mode fpc

peter 20 years ago
parent
commit
594c8943eb

+ 2 - 0
tests/tbs/tb0413.pp

@@ -1,3 +1,5 @@
+{$mode fpc}
+
 var
 var
    s : ansistring;
    s : ansistring;
    ss : shortstring;
    ss : shortstring;

+ 3 - 1
tests/tbs/tb0441.pp

@@ -1,8 +1,10 @@
-program Test;
+{$mode fpc}
+
 operator :=(x:LongInt)RESULT:ShortString;
 operator :=(x:LongInt)RESULT:ShortString;
   begin
   begin
     Val(RESULT,x);
     Val(RESULT,x);
   end;
   end;
+
 var
 var
   s:ShortString;
   s:ShortString;
 begin
 begin

+ 3 - 0
tests/webtbs/tw0938.pp

@@ -1,4 +1,7 @@
 Program test_operator;
 Program test_operator;
+
+{$mode fpc}
+
 type
 type
     Vector = record
     Vector = record
         X,Y,Z : extended;
         X,Y,Z : extended;

+ 2 - 0
tests/webtbs/tw2109.pp

@@ -3,6 +3,8 @@
 { e-mail: [email protected] }
 { e-mail: [email protected] }
 unit tw2109;
 unit tw2109;
 
 
+{$mode fpc}
+
 interface
 interface
 
 
 { warning!!! -- pascal re-generates every result in an operator statement }
 { warning!!! -- pascal re-generates every result in an operator statement }

+ 2 - 0
tests/webtbs/tw2388.pp

@@ -1,3 +1,5 @@
+{$mode fpc}
+
 var
 var
   err : boolean;
   err : boolean;
 
 

+ 25 - 0
tests/webtbs/tw3863.pp

@@ -0,0 +1,25 @@
+{ %cpu=i386 }
+
+{ Source provided for Free Pascal Bug Report 3863 }
+{ Submitted by "Jernej" on  2005-04-01 }
+{ e-mail: [email protected] }
+
+{$mode delphi}
+
+function FormatBuf(var Buffer; BufLen: Cardinal; const Format;
+ FmtLen: Cardinal; const Args: array of const): Cardinal;
+asm
+CMP     EAX,Args.Integer[-4] // -> "error building record offset"
+CMP     [EBX+EAX*8].Byte[4],vtInteger // -> error: assembler error in operand
+CMP     EBX,Args.Integer[-4] // -> "error building record offset"
+MOVZX   EBX,[ESI].Byte[4] // -> error: assembler error in operand
+JMP     @CvtVector.Pointer[EBX*4] // "error: assembler syntax error"
+@CvtVector:
+        DD      0
+        DD      0
+        DD      0
+        DD      0
+end;
+
+begin
+end.

+ 19 - 0
tests/webtbs/tw3864.pp

@@ -0,0 +1,19 @@
+{ Source provided for Free Pascal Bug Report 3864 }
+{ Submitted by "Jernej" on  2005-04-01 }
+{ e-mail: [email protected] }
+const
+ rasteriso: array[0..2] of byte = // this is WAY too big
+ (
+   $00, $00, $00
+ );
+
+procedure glBitMap(const pb:pbyte);cdecl;
+begin
+end;
+
+var
+  i : longint;
+begin
+   i:=0;
+   glBitmap(@rasteriso[(255 - i) * 16]); // Add a character to the current Display list
+end.

+ 20 - 0
tests/webtbs/tw3865.pp

@@ -0,0 +1,20 @@
+{ Source provided for Free Pascal Bug Report 3865 }
+{ Submitted by "Jernej" on  2005-04-01 }
+{ e-mail: [email protected] }
+uses
+  SysUtils;
+
+procedure wantitchars(const text: string; var wot: array of char);
+begin
+  fillchar(wot, sizeof(wot), 0);
+  StrPCopy(wot, text); // FPC ERROR: incompatible type for arg no. 1: got "array of char", expected "pchar"
+end;
+
+var
+  a : array[0..10] of char;
+begin
+  wantitchars('test',a);
+  writeln(a);
+  if a<>'test' then
+    halt(1);
+end.

+ 22 - 0
tests/webtbs/tw3870.pp

@@ -0,0 +1,22 @@
+{ Source provided for Free Pascal Bug Report 3870 }
+{ Submitted by "Tom Verhoeff" on  2005-04-04 }
+{ e-mail: [email protected] }
+program AssertFormatBug;
+  { Illustrates bug with using Format in Assert }
+
+{$assertions on}
+
+uses
+  SysUtils { for IntToStr, Format };
+
+begin
+  try
+    Assert(False, IntToStr(2));  { incorrectly raises EAccessViolation }
+  except
+    on E: EAssertionFailed do
+      begin
+        Writeln('Caught Assert: ',E.Message);
+      end;
+  end;
+end.
+