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

t_id 548
t_version 1.1
t_adddate 2003/10/03
t_result 0
t_knownrunerror 0
t_opts -Or

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/20 16:09:00 22 2024/05/20 23:32:00 0
i386 19 38.0 2024/05/20 16:29:00 52 2024/05/20 23:31:00 0
m68k 1 2.0 2024/05/20 22:44:00 190 2024/05/20 22:44:00 190
sparc 4 8.0 2024/05/20 23:27:00 38 2024/05/20 23:32:00 0
powerpc 1 2.0 2024/05/20 23:05:00 185 2024/05/20 23:05:00 185
arm 1 2.0 2024/05/20 22:30:00 59 2024/05/20 22:30:00 59
x86_64 8 16.0 2024/05/20 16:09:00 22 2024/05/20 19:35:00 26
powerpc64 2 4.0 2024/05/20 23:13:00 213 2024/05/20 23:20:00 71
mips 1 2.0 2024/05/20 22:51:00 240 2024/05/20 22:51:00 240
mipsel 1 2.0 2024/05/20 22:58:00 148 2024/05/20 22:58:00 148
aarch64 12 24.0 2024/05/20 16:27:00 32 2024/05/20 22:24:00 44
linux 11 22.0 2024/05/20 22:24:00 44 2024/05/20 23:30:00 79
solaris 20 40.0 2024/05/20 16:29:00 52 2024/05/20 23:32:00 0
darwin 11 22.0 2024/05/20 16:27:00 32 2024/05/20 17:50:00 56
win64 8 16.0 2024/05/20 16:09:00 22 2024/05/20 19:35:00 26
3.3.1 13 26.0 2024/05/20 16:09:00 22 2024/05/20 23:32:00 0
3.2.2 11 22.0 2024/05/20 16:29:00 52 2024/05/20 17:30:00 45
3.2.3 26 52.0 2024/05/20 16:13:00 26 2024/05/20 23:30:00 79

Source:

{ %VERSION=1.1 }
{ %OPT=-Or }
{ test for full boolean eval and register usage with b+ }

{$b+}

var
  funcscalled: byte;
  ok: boolean;

function function1: boolean;
begin
  writeln('function1 called!');
  inc(funcscalled);
  function1 := false;
end;

function function2: boolean;
begin
  writeln('function2 called!');
  inc(funcscalled);
  function2 := false;
end;

function function3: boolean;
begin
  writeln('function3 called!');
  inc(funcscalled);
  function3 := false;
end;

function function4: boolean;
begin
  writeln('function4 called!');
  inc(funcscalled);
  function4 := false;
end;

function test2: boolean;
var j, k, l, m: longint;
begin
  test2 := true;
  m := 0;
{ get as much regvars occupied as possible }
  for j := 1 to 1000 do
    for k := 1 to 1000 do
      for l := k downto 0 do
         inc(m,j - k + l);
  if (j = 5) and (k = 0) and (l = 100) and function1 then
    begin
      test2 := false;
      writeln('bug');
    end;
end;

begin
  ok := true;
  funcscalled := 0;
  if function1 and function2 and function3 and function4 then
    begin
      writeln('bug!');
    end;
  ok := funcscalled = 4;
  if ok then
    writeln('all functions called!')
  else
    writeln('not all functions called');
  ok := test2 and (funcscalled = 5);
  if ok then
    writeln('test2 passed')
  else writeln('test2 not passed');
  if not ok then
    begin
      writeln('full boolean evaluation is not working!');
      halt(1);
    end;
end.

Link to SVN view of tbs/tb0328.pp source.