Test suite results for test file tbs/tb0427.pp

Test run data :

Free Pascal Compiler Test Suite Results

View Test suite results

Please specify search criteria:
File:
Operating system:
Processor:
Version
Date
Submitter
Machine
Comment
Limit
Cond
Category
Only failed tests
Hide skipped tests
List all tests

Test file "tbs/tb0427.pp" information:

t_id 1052
t_adddate 2003/10/14
t_result 0
t_knownrunerror 0

Detailed test run results:

Record count: 50

Total = 50

OK=0 Percentage= 0.00

Skipped=50 Percentage= 100.00

Result type Cat. Count Percentage First date Last Date
Skipping test run because it is a unit 50 100.0 2024/05/08 13:17:00 68 2024/05/08 20:25:00 69
i386 10 20.0 2024/05/08 13:27:00 22 2024/05/08 19:48:00 175
m68k 2 4.0 2024/05/08 19:15:00 190 2024/05/08 19:55:00 190
sparc 3 6.0 2024/05/08 13:17:00 68 2024/05/08 20:01:00 79
powerpc 2 4.0 2024/05/08 19:37:00 185 2024/05/08 20:18:00 184
arm 3 6.0 2024/05/08 19:02:00 59 2024/05/08 20:25:00 69
x86_64 5 10.0 2024/05/08 13:35:00 32 2024/05/08 20:24:00 52
powerpc64 3 6.0 2024/05/08 13:33:00 60 2024/05/08 19:51:00 71
mips 3 6.0 2024/05/08 16:39:00 49 2024/05/08 20:03:00 240
mipsel 2 4.0 2024/05/08 19:30:00 229 2024/05/08 20:10:00 148
aarch64 14 28.0 2024/05/08 16:11:00 32 2024/05/08 19:34:00 43
sparc64 3 6.0 2024/05/08 13:32:00 159 2024/05/08 20:18:00 148
linux 28 56.0 2024/05/08 13:17:00 68 2024/05/08 20:25:00 69
win32 8 16.0 2024/05/08 13:27:00 22 2024/05/08 19:00:00 22
darwin 12 24.0 2024/05/08 16:11:00 32 2024/05/08 17:40:00 56
win64 2 4.0 2024/05/08 19:43:00 23 2024/05/08 20:10:00 23
3.3.1 12 24.0 2024/05/08 13:17:00 68 2024/05/08 19:00:00 22
3.2.3 38 76.0 2024/05/08 13:33:00 60 2024/05/08 20:25:00 69

Source:

{$MODE objFPC}
unit tb0427;
// Purpose: Demonstrate Internal Error #10
// 
// Version: Free Pascal Compiler version 1.0.6 [2002/04/23] for i386
//          Copyright (c) 1993-2002 by Florian Klaempfl
// 
// Compiler Output:
//  Free pascal Compiler version 1.0.6 [2002/04/23] for i386
//  Copyright (c) 1993-2002 by Florian Klaempfl
//  Target OS: Win32 for i386
//  Compiling c:windowsdesktopfilesprojectssageapi	.pas
//  t.pas(68,51) Fatal: Internal error 10
// 
// Bug Contributor: 
//   Jason Sage   
//   jazesage@aol.com 
//
// Date Contributed:  2002-12-01
// System OS: MS Windows ME v4.90.3000
// System: Compaq, Genuine Intel, Intel(r) Celeron(tm) processor
//         63.0MB Ram
//
interface

implementation

type TClass = class
  protected
  VBuf: ^word;
  public
  constructor Init;
  destructor Done;
  procedure Test(p_dwNewWidth, p_dwNewHeight: Cardinal);
end;  

var 
    MyClass: TClass;

constructor TClass.Init; begin GetMem(VBuf,2); end;

destructor TClass.Done; begin freemem(VBuf); end;

procedure TClass.Test(p_dwNewWidth, p_dwNewHeight: Cardinal);
var 
  OldVBuf: ^word;
  t,s: Cardinal;
  w,h: Cardinal; // preserve Width and Height of VC
  wData: word;
begin
  getmem(OldVBuf,1); freemem(OldVBuf); // shutoff hint
  w:=w; h:=h; // shut off hint
  OldVBuf:=VBuf;
  GetMem(VBuf, p_dwNewWidth * p_dwNewHeight * 2);
  for t:=1 to W do // won't cause error if you do this the more efficient
  begin            // way: for t:=0 to W-1 do
    for s:=1 to H do//     for s:=0 to H-1 do 
    begin           // and replace the [(t-1)+((s-1)*W)] logic to [t+s*w]
      if (t<=p_dwNewWidth) and (s<=p_dwNewHeight) then
      begin
        {
        // This is the work around that I used in my UNIT and the code Works
        wData:=OldVBuf[(t-1)+(s-1)*H];
        VBuf[(t-1)+((s-1)*p_dwNewWidth)]:=wData;
        }

        // This way causes an Internal Error 10 from the compiler.
        VBuf[(t-1)+((s-1)*p_dwNewWidth)]:=OldVBuf[(t-1)+(s-1)*H];
      end;
    end;
  end;
  Freemem(OldVBuf);
end;

begin
  MyClass:=TClass.Init;
  MyClass.Test(1,1);
  MyClass.Done;
end.  

Link to SVN view of tbs/tb0427.pp source.