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

t_id 2
t_version 1.1
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0
t_opts -Og

Detailed test run results:

Record count: 50

Total = 50

OK=47 Percentage= 94.00

Result type Cat. Count Percentage First date Last Date
Failed to run 3 6.0 2024/05/17 11:21:00 241 2024/05/17 11:34:00 242
powerpc 1 33.3 2024/05/17 11:30:00 242 2024/05/17 11:30:00 242
powerpc64 1 33.3 2024/05/17 11:34:00 242 2024/05/17 11:34:00 242
mips 1 33.3 2024/05/17 11:21:00 241 2024/05/17 11:21:00 241
linux 3 100.0 2024/05/17 11:21:00 241 2024/05/17 11:34:00 242
3.3.1 3 100.0 2024/05/17 11:21:00 241 2024/05/17 11:34:00 242
Successfully run 47 94.0 2024/05/17 11:04:00 38 2024/05/17 14:42:00 39
i386 10 21.3 2024/05/17 11:29:00 44 2024/05/17 12:24:00 45
sparc 1 2.1 2024/05/17 12:01:00 74 2024/05/17 12:01:00 74
x86_64 28 59.6 2024/05/17 11:10:00 26 2024/05/17 14:42:00 39
powerpc64 1 2.1 2024/05/17 11:39:00 59 2024/05/17 11:39:00 59
mipsel 1 2.1 2024/05/17 11:26:00 47 2024/05/17 11:26:00 47
aarch64 4 8.5 2024/05/17 11:04:00 38 2024/05/17 12:15:00 38
sparc64 1 2.1 2024/05/17 12:19:00 173 2024/05/17 12:19:00 173
riscv64 1 2.1 2024/05/17 11:56:00 31 2024/05/17 11:56:00 31
linux 35 74.5 2024/05/17 11:04:00 38 2024/05/17 12:48:00 22
solaris 10 21.3 2024/05/17 11:29:00 44 2024/05/17 12:24:00 45
win64 2 4.3 2024/05/17 13:34:00 47 2024/05/17 14:42:00 39
3.3.1 17 36.2 2024/05/17 11:10:00 26 2024/05/17 14:42:00 39
3.2.2 10 21.3 2024/05/17 11:29:00 44 2024/05/17 12:24:00 45
3.2.3 20 42.6 2024/05/17 11:04:00 38 2024/05/17 12:36:00 36

Source:

{ %VERSION=1.1 }
{%OPT=-Og}
{ This verifies if the strings are
  correctly aligned, normally the generated assembler
  should be verified manually.
}
program talign2;

{$ifdef fpc}
{$mode objfpc}
  {$ifndef ver1_0}
    {$define haswidestring}
  {$endif}
{$else}
  {$ifndef ver70}
    {$define haswidestring}
  {$endif}
{$endif}


{$mode objfpc}


procedure test(b : boolean);
begin
  if b then exit;
  WriteLn('Error in length/alignment!!');
  halt(1);
end;

var
 pt: pchar;
const
  b: byte = 0;  { lets just misalign the stuff }
  p : pchar = 'simple pchar stuff';
  ansistr : ansistring = 'simple ansistring';
{$ifdef haswidestring}
  widestr : widestring = 'simple widestring';
{$endif}
  shortstr :shortstring = 'simple shortstring';
begin
  test(length(ansistr)=17);
{$ifdef haswidestring}
  test(length(widestr)=17);
{$endif}
  test(length(shortstr)=18);
  { verify if the address are correctly aligned! }
  pt:=@shortstr;
  test((cardinal(pt) mod sizeof(pointer))=0);
  pt:=p;
  test((cardinal(pt) mod sizeof(pointer))=0);
  pt:=pchar(ansistr);
  test((cardinal(pt) mod sizeof(pointer))=0);
{$ifdef haswidestring}
  pt:=pchar(widestr);
  test((cardinal(pt) mod sizeof(pointer))=0);
{$endif}
end.  
{
   $Log: talign2.pp,v $
   Revision 1.2  2002/11/09 21:19:21  carl
     * now check address of tc's also and give error.
     + 1.1 only

   Revision 1.1  2002/11/09 13:18:25  carl
     * more alignment checking


}

Link to SVN view of test/talign2.pp source.