mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 04:39:34 +02:00
* don't try to bitpack arrays of non-ordinals (mantis #36157)
git-svn-id: trunk@43187 -
This commit is contained in:
parent
51c6ebfe54
commit
33c4a5dda7
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -17841,6 +17841,7 @@ tests/webtbs/tw35982.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw36013.pp svneol=native#text/pascal
|
||||
tests/webtbs/tw3612.pp svneol=native#text/plain
|
||||
tests/webtbs/tw36156.pp svneol=native#text/plain
|
||||
tests/webtbs/tw36157.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3617.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3619.pp svneol=native#text/plain
|
||||
tests/webtbs/tw3621.pp svneol=native#text/plain
|
||||
|
@ -1250,6 +1250,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
|
||||
end
|
||||
{ packed array constant }
|
||||
else if is_packed_array(def) and
|
||||
(def.elementdef.typ in [orddef,enumdef]) and
|
||||
((def.elepackedbitsize mod 8 <> 0) or
|
||||
not ispowerof2(def.elepackedbitsize div 8,i)) then
|
||||
begin
|
||||
|
17
tests/webtbs/tw36157.pp
Normal file
17
tests/webtbs/tw36157.pp
Normal file
@ -0,0 +1,17 @@
|
||||
program WatchesValuePrg;
|
||||
|
||||
type
|
||||
TEnum = (EnVal1, EnVal2, EnVal3, EnVal4);
|
||||
TSet = set of TEnum;
|
||||
TBitPackSetArray2 = bitpacked array [0..1, 0..2] of TSet;
|
||||
const
|
||||
gcBitPackSetArray2 : TBitPackSetArray2 = (([EnVal3, EnVal1], [], [EnVal3]), ([],[EnVal1,EnVal2],[EnVal1]));
|
||||
|
||||
begin
|
||||
if gcBitPackSetArray2[0,0]<>[EnVal3, EnVal1] then
|
||||
halt(1);
|
||||
if gcBitPackSetArray2[0,2]<>[EnVal3] then
|
||||
halt(2);
|
||||
if gcBitPackSetArray2[1,1]<>[EnVal1,EnVal2] then
|
||||
halt(3);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user