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

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

Detailed test run results:

tr_idruntr_oktr_skiptr_result
443564603934949TrueFalseSuccessfully run

Record count: 1

No log of 934949.

Source:

{ this declaration: ;}
{$ifdef FPC}
  {$mode TP}
{$endif}
 var
   name_a : packed array[0..255] of char;

const
   name_b : PChar = 't';

begin
   { the FPC compiler (0.99.14a) will refuse to compile
    the line ; }
    name_a[0]:='x';
    name_a[1]:=#0;
    if (name_b <> name_a) then
      begin
        writeln(' a and b are different');
      end
    else
      writeln('address of name_a and name_b are equal');
    { while it works under Turbo Pascal (TP). ;}
    name_b:=@name_a;
    if name_a<>name_b then
      begin
        Writeln('Wrong result');
        Halt(1);
      end;
{$ifdef FPC}
     if (name_b <> PChar(name_a)) then
      writeln(' a and b are different');
    { is a legal FPC line, but illegal in TP.}
{$endif}
    { I used ; }
    if (name_b <> PChar(@name_a)) then
      writeln(' a and b are different');
    {because it seems to work for both compiler.}

end.

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