Test suite results for test file webtbs/tw3456.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 "webtbs/tw3456.pp" information:

t_id 1417
t_adddate 2004/12/20
t_result 0
t_knownrunerror 0

Detailed test run results:

Record count: 50

Total = 50

OK=50 Percentage= 100.00

Result type Cat. Count Percentage First date Last Date
Successfully run 50 100.0 2024/05/21 02:33:00 24 2024/05/21 06:38:00 212
i386 4 8.0 2024/05/21 03:08:00 33 2024/05/21 06:01:00 28
m68k 2 4.0 2024/05/21 05:47:00 63 2024/05/21 06:07:00 190
powerpc 8 16.0 2024/05/21 06:13:00 42 2024/05/21 06:36:00 0
arm 2 4.0 2024/05/21 05:29:00 69 2024/05/21 05:53:00 67
x86_64 15 30.0 2024/05/21 02:33:00 24 2024/05/21 06:23:00 27
powerpc64 5 10.0 2024/05/21 05:39:00 106 2024/05/21 06:38:00 212
mips 3 6.0 2024/05/21 04:05:00 47 2024/05/21 06:16:00 240
mipsel 1 2.0 2024/05/21 06:23:00 148 2024/05/21 06:23:00 148
aarch64 10 20.0 2024/05/21 05:20:00 46 2024/05/21 06:36:00 32
linux 30 60.0 2024/05/21 02:33:00 24 2024/05/21 06:38:00 212
win32 1 2.0 2024/05/21 06:01:00 28 2024/05/21 06:01:00 28
go32v2 1 2.0 2024/05/21 05:41:00 55 2024/05/21 05:41:00 55
solaris 10 20.0 2024/05/21 05:55:00 29 2024/05/21 06:19:00 29
darwin 8 16.0 2024/05/21 05:42:00 24 2024/05/21 06:35:00 0
3.3.1 20 40.0 2024/05/21 02:33:00 24 2024/05/21 06:36:00 0
3.2.3 30 60.0 2024/05/21 03:08:00 33 2024/05/21 06:38:00 212

Source:

{ Source provided for Free Pascal Bug Report 3456 }
{ Submitted by "Ales Katona (Almindor)" on  2004-12-18 }
{ e-mail: ales@chello.sk }
program objtest;

{$ifdef fpc}
  {$mode objfpc}
{$endif}
{$ifdef win32}
  {$apptype console}
{$endif}

uses
  SysUtils;

const
{$ifdef cpusparc}
  loopcnt = 10000;
{$else}
  loopcnt = 1000000;
{$endif}

type TClassRoot = class
      public
       function Make: TClassRoot; virtual; abstract;
     end;

     TClassB = class;

     TClassA = class(TClassRoot)
      private
       x: longint;
      public
       constructor Create;
       destructor Destroy; override;
       function Make: TClassRoot; override;
     end;

     TClassB = class(TClassRoot)
      private
       x: longint;
      public
       constructor Create;
       destructor Destroy; override;
       function Make: TClassRoot; override;
     end;

constructor TClassA.Create;
begin
  x:=1;
end;

destructor TClassA.Destroy;
begin
  x:=0;
end;

function TClassA.Make: TClassRoot;
begin
  result:=TClassB.Create;
end;

constructor TClassB.Create;
begin
  x:=2;
end;

destructor TClassB.Destroy;
begin
  x:=0;
end;

function TClassB.Make: TClassRoot;
begin
  result:=TClassA.Create;
end;

procedure procb;
var i: longint;
    ar: array of TClassRoot;
    time: double;
begin
  writeln('Array test');
  time:=now;
  setlength(ar, loopcnt+1);
  ar[0]:=TClassA.Create;
  for i:=1 to loopcnt do
    ar[i]:=ar[i-1].Make;
  for i:=0 to loopcnt do
    ar[i].free;
  time:=now-time;
  writeln(time);
end;

var
  p : pointer;
begin
  { Add a big memory block to the free osblocks list }
  getmem(p,1024*1024);
  freemem(p);
  { The small fixed size blocks shall not reuse the big memory block }
  procb;
end.

Link to SVN view of webtbs/tw3456.pp source.