Test suite results for test file tbs/tb0148.pp

Test run data :

Run ID:
Operating system: linux
Processor: x86_64
Version: 3.3.1
Fails/OK/Total: 32/8164/8196
Version: 3.3.1
Full version: 3.3.1
Comment: -Cg -O4 -Criot -Fd
Machine: gcc121
Category: 1
SVN revisions: 20:45361:1:45356:1:45359:1:45360
Submitter: pierre
Date: 2020/05/14 02:18:00
Previous run: 497745
Next run: 498076

Hide skipped tests

Hide successful 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:

tr_idruntr_oktr_skiptr_result
-2127974474497919TrueFalseSuccessfully run

Record count: 1

No log of 497919.

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.