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=39 Percentage= 78.00

Result type Cat. Count Percentage First date Last Date
Failed to run 11 22.0 2024/05/21 05:08:00 158 2024/05/21 07:25:00 242
i386 1 9.1 2024/05/21 06:56:00 236 2024/05/21 06:56:00 236
m68k 1 9.1 2024/05/21 07:06:00 244 2024/05/21 07:06:00 244
powerpc 1 9.1 2024/05/21 07:20:00 242 2024/05/21 07:20:00 242
powerpc64 2 18.2 2024/05/21 05:53:00 132 2024/05/21 07:25:00 242
mips 2 18.2 2024/05/21 07:08:00 154 2024/05/21 07:11:00 243
mipsel 3 27.3 2024/05/21 06:07:00 151 2024/05/21 07:17:00 228
sparc64 1 9.1 2024/05/21 05:08:00 158 2024/05/21 05:08:00 158
linux 11 100.0 2024/05/21 05:08:00 158 2024/05/21 07:25:00 242
3.3.1 7 63.6 2024/05/21 05:08:00 158 2024/05/21 07:25:00 242
3.2.3 4 36.4 2024/05/21 06:07:00 151 2024/05/21 07:17:00 228
Successfully run 39 78.0 2024/05/21 06:12:00 30 2024/05/21 07:39:00 37
i386 3 7.7 2024/05/21 06:26:00 59 2024/05/21 07:25:00 42
m68k 2 5.1 2024/05/21 06:59:00 58 2024/05/21 07:39:00 0
sparc 2 5.1 2024/05/21 06:46:00 68 2024/05/21 06:55:00 81
powerpc 9 23.1 2024/05/21 06:28:00 52 2024/05/21 07:24:00 181
arm 3 7.7 2024/05/21 06:43:00 210 2024/05/21 07:18:00 40
x86_64 2 5.1 2024/05/21 06:12:00 30 2024/05/21 06:21:00 29
powerpc64 4 10.3 2024/05/21 06:26:00 91 2024/05/21 07:32:00 77
mipsel 1 2.6 2024/05/21 07:16:00 47 2024/05/21 07:16:00 47
aarch64 9 23.1 2024/05/21 06:24:00 23 2024/05/21 07:39:00 37
sparc64 2 5.1 2024/05/21 07:11:00 151 2024/05/21 07:17:00 165
loongarch64 2 5.1 2024/05/21 07:01:00 34 2024/05/21 07:33:00 38
linux 31 79.5 2024/05/21 06:26:00 91 2024/05/21 07:39:00 37
go32v2 1 2.6 2024/05/21 06:26:00 59 2024/05/21 06:26:00 59
solaris 2 5.1 2024/05/21 06:12:00 30 2024/05/21 06:21:00 29
darwin 5 12.8 2024/05/21 06:24:00 23 2024/05/21 07:04:00 38
3.3.1 21 53.8 2024/05/21 06:24:00 23 2024/05/21 07:39:00 0
3.2.3 18 46.2 2024/05/21 06:12:00 30 2024/05/21 07:39:00 37

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.