mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-06 23:38:58 +02:00
* fixed alignment of dyn. arrays
git-svn-id: trunk@6458 -
This commit is contained in:
parent
b5b86f6d73
commit
4575c9f424
@ -2307,8 +2307,11 @@ implementation
|
|||||||
|
|
||||||
function tarraydef.alignment : shortint;
|
function tarraydef.alignment : shortint;
|
||||||
begin
|
begin
|
||||||
|
{ alignment of dyn. arrays doesn't depend on the element size }
|
||||||
|
if (ado_IsDynamicArray in arrayoptions) then
|
||||||
|
alignment:=size_2_align(sizeof(aint))
|
||||||
{ alignment is the size of the elements }
|
{ alignment is the size of the elements }
|
||||||
if (elementdef.typ in [arraydef,recorddef]) or
|
else if (elementdef.typ in [arraydef,recorddef]) or
|
||||||
((elementdef.typ=objectdef) and
|
((elementdef.typ=objectdef) and
|
||||||
is_object(elementdef)) then
|
is_object(elementdef)) then
|
||||||
alignment:=elementdef.alignment
|
alignment:=elementdef.alignment
|
||||||
|
Loading…
Reference in New Issue
Block a user