Test suite results for test file webtbs/tw1622.pp

Test run data :

Run ID:
Operating system: linux
Processor: x86_64
Version: 3.2.3
Fails/OK/Total: 27/8127/8154
Version: 3.2.3
Full version: 3.2.3-1373-gae0fe8a6a0
Comment: -gl -Fl/usr/lib -Fl/usr/lib/gcc/x86_64-linux-gnu/10 -Fl/usr/lib/x86_64-linux-gnu -O2 -dFPC_USE_LIBC -Fd
Machine: gcc13
Category: 1
SVN revisions: fdf93c5b29:c17a0e20f5:ae0fe8a6a0:d1c29e6cb9
Submitter: pierre
Date: 2024/04/19 10:31:00 <> 2024/04/09
Previous run: 934292
Next run: 935624

Hide skipped tests

Hide successful tests

Test file "webtbs/tw1622.pp" information:

t_id 833
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0

Detailed test run results:

tr_idruntr_oktr_skiptr_result
443565018934949TrueFalseSuccessfully run

Record count: 1

No log of 934949.

Source:

{ Source provided for Free Pascal Bug Report 1622 }
{ Submitted by "Henrik C. Jessen" on  2001-09-28 }
{ e-mail: henrik.jessen@nettest.com }
PROGRAM Test;


{$ifdef go32v2}
CONST
   SomeSegment = $B800;
   SomeOffset  = $0000;
VAR
   AbsOne : Word ABSOLUTE $B800:$0000;
      { -- accepted by FPC }

   AbsTwo : Word ABSOLUTE SomeSegment:SomeOffset;
      { -- NOT accepted by FPC }

   AbsThree : Word ABSOLUTE $B000+$400*2:24*16+4-32;
   AbsFour : Word ABSOLUTE SomeSegment+$400*2:SomeOffset*4-32;
   { The two variables above are at the same }
   { address; that is correctly recognized   }
   { by Borland Pascal.                      }
   {-----------------------------------------}
{$endif go32v2}


{ Adding some test code for normal absolute stuff }

procedure testabs(var x : longint);
var
  y : longint absolute x;
begin
  y:=x+1;
end;

{ If x is diclared as const parametr
  the compilation should fail }

procedure testabs2({const }x : longint);
var
  y : longint absolute x;
begin
  y:=x+1;
end;

procedure teststring(s : string);
var
  y : byte absolute s;
begin
  { this will truncate the string to 4 chars }
  y:=4;
  Writeln(s);
end;

procedure teststringvar(var s : string);
var
  y : byte absolute s;
begin
  { this will truncate the string to 4 chars }
  y:=4;
  Writeln(s);
end;

procedure test_global_var;
var
  y : integer absolute system.exitcode;
begin
  y := 315;
end;

const
  x : longint = 5;
  y : longint = 7;
var
  s : string;

BEGIN
  testabs(x);
  if x<>6 then
    begin
      Writeln('Error in absolute handling');
      Halt(1);
    end;
  testabs2(y);
  if y<>7 then
    begin
      Writeln('Error in absolute handling');
      Halt(1);
    end;
  s:='Test dummy string';
  teststring(s);
  if s<>'Test dummy string' then
    begin
      Writeln('Error in absolute handling for strings');
      Halt(1);
    end;
  teststringvar(s);
  if s<>'Test' then
    begin
      Writeln('Error in absolute handling for strings');
      Halt(1);
    end;
  test_global_var;
  if exitcode<>315 then
    begin
      Writeln('Error in absolute handling');
      Halt(1);
    end;
  exitcode:=0;
END.

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