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

t_id 1494
t_adddate 2005/02/14
t_result 0
t_knownrunerror 0

Detailed test run results:

Record count: 50

Total = 50

OK=1 Percentage= 2.00

Skipped=49 Percentage= 98.00

Result type Cat. Count Percentage First date Last Date
Successfully run 1 2.0 2024/05/08 19:00:00 22 2024/05/08 19:00:00 22
i386 1 100.0 2024/05/08 19:00:00 22 2024/05/08 19:00:00 22
win32 1 100.0 2024/05/08 19:00:00 22 2024/05/08 19:00:00 22
3.3.1 1 100.0 2024/05/08 19:00:00 22 2024/05/08 19:00:00 22
Skipping test because for other target 49 98.0 2024/05/08 18:55:00 44 2024/05/08 23:32:00 40
i386 5 10.2 2024/05/08 19:08:00 176 2024/05/08 23:30:00 34
m68k 3 6.1 2024/05/08 19:15:00 190 2024/05/08 20:43:00 63
sparc 7 14.3 2024/05/08 20:01:00 79 2024/05/08 23:32:00 40
powerpc 3 6.1 2024/05/08 19:37:00 185 2024/05/08 21:11:00 188
arm 3 6.1 2024/05/08 19:02:00 59 2024/05/08 20:25:00 69
x86_64 10 20.4 2024/05/08 19:43:00 23 2024/05/08 23:14:00 21
powerpc64 6 12.2 2024/05/08 19:44:00 213 2024/05/08 21:28:00 73
mips 3 6.1 2024/05/08 19:23:00 240 2024/05/08 20:52:00 160
mipsel 3 6.1 2024/05/08 19:30:00 229 2024/05/08 21:02:00 151
aarch64 3 6.1 2024/05/08 18:55:00 44 2024/05/08 20:16:00 46
sparc64 3 6.1 2024/05/08 20:18:00 148 2024/05/08 22:05:00 151
linux 38 77.6 2024/05/08 18:55:00 44 2024/05/08 23:30:00 34
solaris 4 8.2 2024/05/08 23:24:00 38 2024/05/08 23:32:00 40
win64 7 14.3 2024/05/08 19:43:00 23 2024/05/08 23:14:00 21
3.3.1 2 4.1 2024/05/08 23:14:00 21 2024/05/08 23:32:00 40
3.2.3 47 95.9 2024/05/08 18:55:00 44 2024/05/08 23:30:00 37

Source:

{ %target=win32 }

{ Source provided for Free Pascal Bug Report 3650 }
{ Submitted by "Sergey" on  2005-02-11 }
{ e-mail: sergey@michint.kiev.ua }
// Title: stdcall and variant/record parameters
// Succeded: dcc32.exe, Delphi6
// Failed: fpc-1.9.6, fpc-1.9.7
{$IFDEF FPC}
{$mode delphi}
{$C+}
{$ELSE}
{$AppType CONSOLE}
uses Variants;
{$ENDIF}

function Test1(guid: TGUID; p1, p2: Pointer): HRESULT; stdcall;
begin
  Writeln(Integer(Addr(p1))-Integer(Addr(guid)));
  Writeln(Integer(Addr(p2))-Integer(Addr(p1)));
  Assert(Integer(Addr(p1))-Integer(Addr(guid)) = 16, 'bug rec_std (?)');
  // Fixes: compiler/i386/cpupara.pas:141  when s/8/16/
end;

function Test2(v: VARIANT; p1, p2: Pointer): HRESULT; stdcall;
begin
  Writeln(Integer(Addr(p1))-Integer(Addr(v)));
  Writeln(Integer(Addr(p2))-Integer(Addr(p1)));
  Assert(Integer(Addr(p1))-Integer(Addr(v)) = 16, 'bug var_std (?)');
end;

function Test1c(guid: TGUID; p1, p2: Pointer): HRESULT; cdecl;
begin
  Writeln(Integer(Addr(p1))-Integer(Addr(guid)));
  Writeln(Integer(Addr(p2))-Integer(Addr(p1)));
  Assert(Integer(Addr(p1))-Integer(Addr(guid)) = 16, 'bug rec_c (?)');
end;

function Test2c(v: VARIANT; p1, p2: Pointer): HRESULT; cdecl;
begin
  Writeln(Integer(Addr(p1))-Integer(Addr(v)));
  Writeln(Integer(Addr(p2))-Integer(Addr(p1)));
  Assert(Integer(Addr(p1))-Integer(Addr(v)) = 16, 'bug var_c (?)');
end;

begin
  Write('SizeOf(TGUID)=', SizeOf(TGUID));
  Writeln(' SizeOf(VARIANT)=', SizeOf(VARIANT));
  Test1(IUnknown, nil, nil); {try "s/nil/@Sin/" - you'll get 'Error while linking'}
  Test2(Null, nil, nil);
  Test1c(IUnknown, nil, nil);
  Test2c(Null, nil, nil);
end.

(*
// Fix for 1.9.7: compiler/i386/cpupara.pas:128 in
// function ti386paramanager.push_addr_param(varspez:tvarspez;def : tdef;calloption : tproccalloption) : boolean;
// when
        { Only vs_const, vs_value here }
        case def.deftype of
{!}       variantdef:
{!}         result:=not(calloption in [pocall_stdcall,pocall_cdecl{,pocall_cppdecl???}]);
{!}       formaldef :
            result:=true;
          recorddef :
            begin
              { Win32 passes small records on the stack for call by
                value }
              if (target_info.system=system_i386_win32) and
                 (calloption in [pocall_stdcall,pocall_cdecl,pocall_cppdecl]) and
                 (varspez=vs_value) and
                 (def.size<=8{or 16?}) then
                result:=false
              else
{!}             result:=not(calloption in [pocall_stdcall{!},pocall_cdecl,pocall_cppdecl]) and (def.size>sizeof(aint));
            end;

*)

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