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

t_id 1235
t_adddate 2004/01/22
t_result 0
t_knownrunerror 0

Detailed test run results:

Record count: 50

Total = 50

OK=44 Percentage= 88.00

Result type Cat. Count Percentage First date Last Date
Failed to run 6 12.0 2024/10/19 08:18:00 121 2024/10/19 11:33:00 117
i386 1 16.7 2024/10/19 09:40:00 209 2024/10/19 09:40:00 209
powerpc 1 16.7 2024/10/19 10:03:00 203 2024/10/19 10:03:00 203
mips 1 16.7 2024/10/19 08:18:00 121 2024/10/19 08:18:00 121
mipsel 1 16.7 2024/10/19 08:27:00 188 2024/10/19 08:27:00 188
sparc64 2 33.3 2024/10/19 10:46:00 141 2024/10/19 11:33:00 117
linux 6 100.0 2024/10/19 08:18:00 121 2024/10/19 11:33:00 117
3.3.1 4 66.7 2024/10/19 09:40:00 209 2024/10/19 11:33:00 117
3.2.3 2 33.3 2024/10/19 08:18:00 121 2024/10/19 08:27:00 188
Successfully run 44 88.0 2024/10/19 07:29:00 50 2024/10/19 13:34:00 29
i386 3 6.8 2024/10/19 08:55:00 60 2024/10/19 11:13:00 63
m68k 3 6.8 2024/10/19 07:29:00 50 2024/10/19 10:22:00 40
sparc 5 11.4 2024/10/19 08:05:00 45 2024/10/19 11:16:00 40
powerpc 5 11.4 2024/10/19 08:35:00 146 2024/10/19 13:26:00 65
arm 2 4.5 2024/10/19 09:36:00 32 2024/10/19 10:03:00 32
x86_64 10 22.7 2024/10/19 08:27:00 30 2024/10/19 13:34:00 29
powerpc64 7 15.9 2024/10/19 08:43:00 65 2024/10/19 10:59:00 68
mips 1 2.3 2024/10/19 09:54:00 35 2024/10/19 09:54:00 35
aarch64 3 6.8 2024/10/19 08:15:00 27 2024/10/19 09:13:00 24
sparc64 2 4.5 2024/10/19 08:33:00 120 2024/10/19 09:25:00 118
riscv64 2 4.5 2024/10/19 10:25:00 33 2024/10/19 11:10:00 26
loongarch64 1 2.3 2024/10/19 09:45:00 25 2024/10/19 09:45:00 25
linux 30 68.2 2024/10/19 07:29:00 50 2024/10/19 11:38:00 25
go32v2 3 6.8 2024/10/19 08:55:00 60 2024/10/19 11:13:00 63
solaris 6 13.6 2024/10/19 13:24:00 25 2024/10/19 13:34:00 29
aix 5 11.4 2024/10/19 08:40:00 51 2024/10/19 13:26:00 65
3.3.1 23 52.3 2024/10/19 08:05:00 45 2024/10/19 13:26:00 65
3.2.3 21 47.7 2024/10/19 07:29:00 50 2024/10/19 13:34:00 29

Source:

{ Source provided for Free Pascal Bug Report 2911 }
{ Submitted by "Chris Hilder" on  2004-01-19 }
{ e-mail: cj.hilder@astronomyinyourhands.com }
program bug_demo;
{$LONGSTRINGS ON}

{$ifdef fpc}{$Mode objfpc}{$endif}

type
        RecordWithStrings =
                record
                        one,
                        two : string;
                end;

var
        onestring,
        twostring : string;
        ARecordWithStrings : RecordWithStrings;

procedure RefCount(const s : string;expect:longint);
type
        PLongint = ^Longint;
var
        P : PLongint;
        rc : longint;
begin
        P := PLongint(s);
        rc:=0;
        if (p = nil)
        then writeln('Nil string.')
        else
{$ifdef  fpc}
         rc:=(p-1)^;
{$else}
         rc:=plongint(pchar(p)-8)^);
{$endif}
  writeln('Ref count is ',rc,' expected ',expect);
  if rc<>expect then
    halt(1);
end;

function FunctionResultIsRecord(a : RecordWithStrings) : RecordWithStrings;
begin
        result := a;
end;

begin
        writeln('All reference counts should be 1 for the following...');
        onestring := 'one';
        twostring := 'two';
        ARecordWithStrings.one := onestring + twostring;
        twostring := onestring + twostring;
        RefCount(ARecordWithStrings.one,1);
        ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
        twostring := onestring + twostring;
        RefCount(ARecordWithStrings.one,2);
        ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
        twostring := onestring + twostring;
        RefCount(ARecordWithStrings.one,3);
        ARecordWithStrings := FunctionResultIsRecord(ARecordWithStrings);
        twostring := onestring + twostring;
        RefCount(ARecordWithStrings.one,4);
end.

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