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/17 12:36:00 36 2024/05/17 23:38:00 29
i386 16 32.0 2024/05/17 22:07:00 21 2024/05/17 23:38:00 29
sparc 11 22.0 2024/05/17 23:24:00 38 2024/05/17 23:38:00 38
powerpc 1 2.0 2024/05/17 21:13:00 42 2024/05/17 21:13:00 42
x86_64 6 12.0 2024/05/17 12:36:00 36 2024/05/17 14:42:00 39
powerpc64 13 26.0 2024/05/17 20:12:00 105 2024/05/17 20:54:00 132
aarch64 3 6.0 2024/05/17 16:15:00 32 2024/05/17 16:28:00 32
linux 18 36.0 2024/05/17 12:36:00 36 2024/05/17 21:13:00 42
win32 4 8.0 2024/05/17 22:07:00 21 2024/05/17 23:27:00 24
solaris 23 46.0 2024/05/17 23:23:00 25 2024/05/17 23:38:00 29
darwin 3 6.0 2024/05/17 16:15:00 32 2024/05/17 16:28:00 32
win64 2 4.0 2024/05/17 13:34:00 47 2024/05/17 14:42:00 39
3.3.1 40 80.0 2024/05/17 12:37:00 18 2024/05/17 23:38:00 29
3.2.3 10 20.0 2024/05/17 12:36:00 36 2024/05/17 23:38:00 38

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.