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/05/17 10:38:00 39 2024/05/17 12:19:00 173
i386 11 22.0 2024/05/17 11:09:00 236 2024/05/17 12:18:00 45
m68k 1 2.0 2024/05/17 11:17:00 244 2024/05/17 11:17:00 244
sparc 1 2.0 2024/05/17 12:01:00 74 2024/05/17 12:01:00 74
powerpc 1 2.0 2024/05/17 11:30:00 242 2024/05/17 11:30:00 242
arm 1 2.0 2024/05/17 11:05:00 37 2024/05/17 11:05:00 37
x86_64 22 44.0 2024/05/17 10:50:00 23 2024/05/17 11:57:00 35
powerpc64 2 4.0 2024/05/17 11:34:00 242 2024/05/17 11:39:00 59
mips 1 2.0 2024/05/17 11:21:00 241 2024/05/17 11:21:00 241
mipsel 1 2.0 2024/05/17 11:26:00 47 2024/05/17 11:26:00 47
aarch64 6 12.0 2024/05/17 10:38:00 39 2024/05/17 12:15:00 38
sparc64 1 2.0 2024/05/17 12:19:00 173 2024/05/17 12:19:00 173
riscv64 1 2.0 2024/05/17 11:56:00 31 2024/05/17 11:56:00 31
loongarch64 1 2.0 2024/05/17 11:13:00 34 2024/05/17 11:13:00 34
linux 40 80.0 2024/05/17 10:38:00 39 2024/05/17 12:19:00 173
solaris 10 20.0 2024/05/17 11:17:00 44 2024/05/17 12:18:00 45
3.3.1 21 42.0 2024/05/17 10:50:00 23 2024/05/17 12:19:00 173
3.2.2 10 20.0 2024/05/17 11:17:00 44 2024/05/17 12:18:00 45
3.2.3 19 38.0 2024/05/17 10:38:00 39 2024/05/17 12:15:00 38

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.