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

t_id 1420
t_adddate 2004/12/27
t_result 0
t_knownrunerror 0

Detailed test run results:

Record count: 50

Total = 50

OK=42 Percentage= 84.00

Skipped=2 Percentage= 4.00

Result type Cat. Count Percentage First date Last Date
Failed to run 6 12.0 2024/10/19 08:33:00 120 2024/10/19 11:33:00 117
i386 1 16.7 2024/10/19 09:40:00 209 2024/10/19 09:40:00 209
powerpc 1 16.7 2024/10/19 10:03:00 203 2024/10/19 10:03:00 203
sparc64 4 66.7 2024/10/19 08:33:00 120 2024/10/19 11:33:00 117
linux 6 100.0 2024/10/19 08:33:00 120 2024/10/19 11:33:00 117
3.3.1 4 66.7 2024/10/19 09:40:00 209 2024/10/19 11:33:00 117
3.2.3 2 33.3 2024/10/19 08:33:00 120 2024/10/19 09:25:00 118
Successfully run 42 84.0 2024/10/19 08:15:00 27 2024/10/19 13:36:00 24
m68k 2 4.8 2024/10/19 09:50:00 39 2024/10/19 10:22:00 40
sparc 2 4.8 2024/10/19 09:01:00 54 2024/10/19 11:16:00 40
powerpc 4 9.5 2024/10/19 09:08:00 50 2024/10/19 13:26:00 65
arm 2 4.8 2024/10/19 09:36:00 32 2024/10/19 10:03:00 32
x86_64 10 23.8 2024/10/19 09:32:00 37 2024/10/19 13:36:00 24
powerpc64 9 21.4 2024/10/19 08:43:00 65 2024/10/19 11:23:00 69
mips 2 4.8 2024/10/19 09:54:00 35 2024/10/19 10:28:00 38
mipsel 1 2.4 2024/10/19 09:59:00 38 2024/10/19 09:59:00 38
aarch64 6 14.3 2024/10/19 08:15:00 27 2024/10/19 09:57:00 26
riscv64 2 4.8 2024/10/19 10:25:00 33 2024/10/19 11:10:00 26
loongarch64 2 4.8 2024/10/19 09:45:00 25 2024/10/19 10:17:00 30
linux 26 61.9 2024/10/19 08:15:00 27 2024/10/19 11:38:00 25
solaris 8 19.0 2024/10/19 13:22:00 24 2024/10/19 13:36:00 24
aix 8 19.0 2024/10/19 09:08:00 50 2024/10/19 13:26:00 65
3.3.1 21 50.0 2024/10/19 09:32:00 28 2024/10/19 13:26:00 65
3.2.3 21 50.0 2024/10/19 08:15:00 27 2024/10/19 13:36:00 24
Skipping test because for other target 2 4.0 2024/10/19 10:27:00 65 2024/10/19 11:13:00 63
i386 2 100.0 2024/10/19 10:27:00 65 2024/10/19 11:13:00 63
go32v2 2 100.0 2024/10/19 10:27:00 65 2024/10/19 11:13:00 63
3.3.1 2 100.0 2024/10/19 10:27:00 65 2024/10/19 11:13:00 63

Source:

{ Source provided for Free Pascal Bug Report 3467 }
{ Submitted by "Micha Nelissen" on  2004-12-24 }
{ e-mail: micha@neli.hopto.org }
program threadvartest;

{$mode objfpc}
{$H+}

uses
  erroru,
  sysutils,
  classes
{$ifdef unix}
  , cthreads
{$endif}
  ;

type
  tthread1 = class(tthread)
  public
    p : pointer;
    procedure execute; override;
  end;

  tthread2 = class(tthread)
  public
    p : pointer;
    procedure execute; override;
  end;

threadvar
  athreadvar: integer;

procedure tthread1.execute;
var
  i: integer;
begin
  writeln('thread 1 var is @', ptrint(@athreadvar));
    athreadvar := 1;
    p:=@athreadvar;
   Sleep(2000);
    for i := 0 to 100000 do
      if athreadvar <> 1 then
      begin
        writeln(athreadvar);
        error;
        break;
      end;
end;

procedure tthread2.execute;
var
  i: integer;
begin
  writeln('thread 2 var is @', ptrint(@athreadvar));
    athreadvar := 9;
    p:=@athreadvar;
   Sleep(2000);
    for i := 0 to 100000 do
      if athreadvar <> 9 then
      begin
        writeln('  ', athreadvar);
        error;
        break;
      end;
end;

var
  thread1: tthread1;
  thread2: tthread2;
begin
  thread1 := tthread1.create(false);
  thread2 := tthread2.create(false);
  thread1.waitfor;
  thread2.waitfor;
  if thread1.p=thread2.p then
    error;
end.

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