mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 00:19:24 +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;
|
||||
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 }
|
||||
if (elementdef.typ in [arraydef,recorddef]) or
|
||||
else if (elementdef.typ in [arraydef,recorddef]) or
|
||||
((elementdef.typ=objectdef) and
|
||||
is_object(elementdef)) then
|
||||
alignment:=elementdef.alignment
|
||||
|
Loading…
Reference in New Issue
Block a user