mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-12 02:20:36 +01:00
Fix for sparc64 specific code generation bug report #40252
This commit is contained in:
parent
484c178c15
commit
3bb2586269
@ -67,8 +67,9 @@ implementation
|
||||
is_open_array(def) or
|
||||
is_array_of_const(def) or
|
||||
is_array_constructor(def);
|
||||
{ Fix codegen problem for empty record by always passing by address a zero-sized record }
|
||||
recorddef:
|
||||
result:=def.size>recsizelimit;
|
||||
result:=(def.size>recsizelimit) or (def.size=0);
|
||||
variantdef:
|
||||
result:=false;
|
||||
formaldef :
|
||||
|
||||
25
tests/webtbs/tw40252.pp
Normal file
25
tests/webtbs/tw40252.pp
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
type
|
||||
TLazLoggerLogEnabled = record end;
|
||||
|
||||
procedure Test(Log : TLazLoggerLogEnabled; const s : string);
|
||||
begin
|
||||
writeln('Test: ',s);
|
||||
end;
|
||||
|
||||
procedure Testv(var Log : TLazLoggerLogEnabled; const s : string);
|
||||
begin
|
||||
writeln('Testv: ',s);
|
||||
end;
|
||||
|
||||
procedure DebuglnStack(LogEnabled: TLazLoggerLogEnabled; const s: string);
|
||||
begin
|
||||
Test(LogEnabled, s);
|
||||
Testv(LogEnabled, s);
|
||||
end;
|
||||
|
||||
var
|
||||
LE : TLazLoggerLogEnabled;
|
||||
begin
|
||||
DebuglnStack(LE,'Test string');
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user