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

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

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:32:00 34
i386 12 24.0 2024/05/17 11:09:00 236 2024/05/17 12:24: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 11:06:00 36 2024/05/17 12:32:00 34
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 5 10.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 39 78.0 2024/05/17 10:38:00 39 2024/05/17 12:32:00 34
solaris 11 22.0 2024/05/17 11:17:00 44 2024/05/17 12:24:00 45
3.3.1 18 36.0 2024/05/17 11:05:00 37 2024/05/17 12:24:00 30
3.2.2 11 22.0 2024/05/17 11:17:00 44 2024/05/17 12:24:00 45
3.2.3 21 42.0 2024/05/17 10:38:00 39 2024/05/17 12:32:00 34

Source:

{$mode objfpc}
uses sysutils;

{$r+}

var
  a1: array[-5..6] of byte;
  a2: array[-12..-1] of byte;
  a3: array[0..6] of byte;
  a4: array[1..12] of byte;

  c: cardinal;
  l: longint;
  b: byte;
  finalerror: boolean;

function check_longint(l: longint; res1, res2, res3, res4: boolean): boolean;
var
  caught,
  error: boolean;
begin
  result := false;

  caught := false;
  try
    b := a1[l];
  except
    caught := true;
  end;
  error := caught <> res1;
  if error then writeln('long 1 failed for ',l);
  result := result or error;

  caught := false;
  try
    b := a2[l];
  except
    caught := true;
  end;
  error := caught <> res2;
  if error then writeln('long 2 failed for ',l);
  result := result or error;

  caught := false;
  try
    b := a3[l];
  except
    caught := true;
  end;
  error := caught <> res3;
  if error then writeln('long 3 failed for ',l);
  result := result or error;

  caught := false;
  try
    b := a4[l];
  except
    caught := true;
  end;
  error := caught <> res4;
  if error then writeln('long 4 failed for ',l);
  result := result or error;
  writeln;
end;

function check_cardinal(l: cardinal; res1, res2, res3, res4: boolean): boolean;
var
  caught,
  error: boolean;
begin
  result := false;

  caught := false;
  try
    b := a1[l];
  except
    caught := true;
  end;
  error := caught <> res1;
  if error then writeln('card 1 failed for ',l);
  result := result or error;

  caught := false;
  try
    b := a2[l];
  except
    caught := true;
  end;
  error := caught <> res2;
  if error then writeln('card 2 failed for ',l);
  result := result or error;

  caught := false;
  try
    b := a3[l];
  except
    caught := true;
  end;
  error := caught <> res3;
  if error then writeln('card 3 failed for ',l);
  result := result or error;

  caught := false;
  try
    b := a4[l];
  except
    caught := true;
  end;
  error := caught <> res4;
  if error then writeln('card 4 failed for ',l);
  result := result or error;
  writeln;
end;


begin
  finalerror :=
    check_longint(-1,false,false,true,true);
  finalerror :=
    check_longint(-6,true,false,true,true) or finalerror;
  finalerror :=
    check_longint(0,false,true,false,true) or finalerror;
  finalerror :=
    check_cardinal(0,false,true,false,true);
  finalerror :=
    check_cardinal(cardinal($ffffffff),true,true,true,true) or finalerror;
  finalerror :=
    check_cardinal(5,false,true,false,false) or finalerror;
  if finalerror then
    begin
      writeln('Still errors in range checking for array indexes');
      halt(1);
    end;
end.

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