mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-02-04 08:34:49 +01:00
* records containing managed types are not "regable", resolves #21674
git-svn-id: trunk@20753 -
This commit is contained in:
parent
66b0f3d9fb
commit
dd70debe80
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12314,6 +12314,7 @@ tests/webtbs/tw2159.pp svneol=native#text/plain
|
||||
tests/webtbs/tw21592.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw21593.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw2163.pp svneol=native#text/plain
|
||||
tests/webtbs/tw21674.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw2176.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2177.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2178.pp svneol=native#text/plain
|
||||
|
||||
@ -1430,7 +1430,8 @@ implementation
|
||||
recsize:=size;
|
||||
is_intregable:=
|
||||
ispowerof2(recsize,temp) and
|
||||
(recsize <= sizeof(asizeint));
|
||||
(recsize <= sizeof(asizeint))
|
||||
and not needs_inittable;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
24
tests/webtbs/tw21674.pp
Normal file
24
tests/webtbs/tw21674.pp
Normal file
@ -0,0 +1,24 @@
|
||||
{$optimization on}
|
||||
program Project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
type
|
||||
TMyArray = record
|
||||
Stuff: array of Longword;
|
||||
end;
|
||||
|
||||
Var
|
||||
MyArray: TMyArray;
|
||||
I: Integer;
|
||||
|
||||
procedure WriteNumbers(A: TMyArray);
|
||||
begin
|
||||
for I := 0 to High(A.Stuff) do WriteLn(A.Stuff[I]);
|
||||
end;
|
||||
|
||||
begin
|
||||
SetLength(MyArray.Stuff, 100);
|
||||
for I := 0 to High(MyArray.Stuff) do MyArray.Stuff[I] := I;
|
||||
WriteNumbers(MyArray);
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user