{$align} and {$packrecords} directives do nothing
Original Reporter info from Mantis: Marladu
-
Reporter name: Marladu
Original Reporter info from Mantis: Marladu
- Reporter name: Marladu
Description:
Compiling the following code with trunk freepascal for win32, the field rec2.b should have an offset of 16 from start of record but has an offset of 4.
Steps to reproduce:
program Project1;
type
rec1=record
l1,l2,l3,l4:longint;
end;
{$align 16}{$packrecords 16}
type
rec2=record
a:longint;
b:rec1;
end;
var
abc:rec2;
begin
if (longint(@abc.b)-longint(@abc))<>16 then // this should be 16 but is 4
halt(1);
end.
Mantis conversion info:
- Mantis ID: 27480
- OS: windows
- OS Build: windows 7
- Build: #29700 (2015/02/15)
- Platform: win32
- Version: 3.1.1