mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-23 01:53:17 +02:00
* references of fields for types using indirect addressing get proper alignment
git-svn-id: trunk@38252 -
This commit is contained in:
parent
9a136836fd
commit
a21f462a93
@ -355,8 +355,10 @@ implementation
|
|||||||
if (not is_managed_type(left.resultdef)) or
|
if (not is_managed_type(left.resultdef)) or
|
||||||
(target_info.system in systems_garbage_collected_managed_types) then
|
(target_info.system in systems_garbage_collected_managed_types) then
|
||||||
begin
|
begin
|
||||||
{ the contents of a class are aligned to a sizeof(pointer) }
|
{ take care of the alignment of the fields }
|
||||||
location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),voidpointertype.size,[]);
|
if not(left.resultdef is tabstractrecorddef) then
|
||||||
|
Internalerror(2018021601);
|
||||||
|
location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),newalignment(tabstractrecorddef(left.resultdef).alignment,vs.fieldoffset),[]);
|
||||||
case left.location.loc of
|
case left.location.loc of
|
||||||
LOC_CREGISTER,
|
LOC_CREGISTER,
|
||||||
LOC_REGISTER:
|
LOC_REGISTER:
|
||||||
|
Loading…
Reference in New Issue
Block a user