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

t_id 390
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0
t_opts -Sg

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/06/02 01:36:00 47 2024/06/02 06:26:00 0
i386 7 14.0 2024/06/02 01:36:00 47 2024/06/02 05:03:00 55
m68k 1 2.0 2024/06/02 03:55:00 53 2024/06/02 03:55:00 53
sparc 5 10.0 2024/06/02 03:07:00 41 2024/06/02 04:45:00 56
powerpc 1 2.0 2024/06/02 04:10:00 238 2024/06/02 04:10:00 238
x86_64 23 46.0 2024/06/02 01:57:00 22 2024/06/02 06:26:00 0
powerpc64 4 8.0 2024/06/02 04:15:00 53 2024/06/02 04:32:00 57
mips 1 2.0 2024/06/02 04:00:00 47 2024/06/02 04:00:00 47
mipsel 1 2.0 2024/06/02 04:06:00 185 2024/06/02 04:06:00 185
aarch64 5 10.0 2024/06/02 01:46:00 39 2024/06/02 05:21:00 0
sparc64 1 2.0 2024/06/02 05:03:00 157 2024/06/02 05:03:00 157
riscv64 1 2.0 2024/06/02 04:39:00 31 2024/06/02 04:39:00 31
linux 39 78.0 2024/06/02 01:36:00 47 2024/06/02 05:29:00 0
go32v2 3 6.0 2024/06/02 03:45:00 54 2024/06/02 05:03:00 55
solaris 8 16.0 2024/06/02 03:07:00 41 2024/06/02 06:26:00 0
3.3.1 26 52.0 2024/06/02 01:46:00 39 2024/06/02 06:26:00 0
3.2.3 24 48.0 2024/06/02 01:36:00 47 2024/06/02 05:29:00 0

Source:

{ %OPT=-Sg }

{ Old file: tbs0178.pp }
{ problems with undefined labels and fail outside constructor OK 0.99.9 (PM) }

PROGRAM NoLabel; { this program compiles fine with TP but not with FP }

 type
    ptestobj = ^ttestobj;
    ttestobj = object
            constructor init;
            procedure test_self;
            end;

 const
    allowed : boolean = false;

    constructor ttestobj.init;
      begin
        if not allowed then
          fail;
      end;
    procedure ttestobj.test_self;
      function myself : ptestobj;
        begin
           myself:=@self;
        end;

      begin
         if myself<>@self then
           begin
              Writeln('problem with self');
              Halt(1);
           end;
      end;


LABEL
  N1,
  N2,
  FAIL, { this is a reserved word in constructors only! - FP fails here
}
  More; { label not defined - FP fails, but a warning is enough for that
}
           { since label referenced nowhere }
 var ptest : ptestobj;
     self : longint;
BEGIN
  new(ptest,init);
  if ptest<>nil then
    begin
       Writeln('Fail does not work !!');
       Halt(1);
    end;
  allowed:=true;
  new(ptest,init);
  if ptest=nil then
    begin
       Writeln('Constructor does not work !!');
       Halt(1);
    end
  else
    ptest^.test_self;
  N1: Write;
  N2: Write;
  FAIL: Write;
  self:=1;
END.

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