mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 05:10:27 +02:00
* also initalize default helper variables of initialization sections, resolves #40183
This commit is contained in:
parent
86ffe69380
commit
0d3ec87492
@ -424,6 +424,7 @@ implementation
|
||||
{ The library init code is already called and does not
|
||||
need to be in the initfinal table (PFV) }
|
||||
block:=statement_block(_INITIALIZATION);
|
||||
init_main_block_syms(block);
|
||||
end
|
||||
else if token=_FINALIZATION then
|
||||
begin
|
||||
|
5
tests/webtbs/tw40183.pp
Normal file
5
tests/webtbs/tw40183.pp
Normal file
@ -0,0 +1,5 @@
|
||||
uses
|
||||
uw40183;
|
||||
|
||||
begin
|
||||
end.
|
24
tests/webtbs/uw40183.pp
Normal file
24
tests/webtbs/uw40183.pp
Normal file
@ -0,0 +1,24 @@
|
||||
unit uw40183;
|
||||
|
||||
{$mode ObjFPC}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Types;
|
||||
|
||||
type
|
||||
TBuffer = packed record
|
||||
Mask: Int64;
|
||||
DataArray: TObjectDynArray;
|
||||
end;
|
||||
|
||||
var
|
||||
GlobalBuffer: TBuffer;
|
||||
|
||||
implementation
|
||||
|
||||
initialization
|
||||
GlobalBuffer := Default(TBuffer);
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user