mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 06:49:27 +02:00
* fixed another IE with indexing bitpacked arrays of composite types,
this time with constant rather than variable indices git-svn-id: trunk@7599 -
This commit is contained in:
parent
445d116b78
commit
de75b34dba
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -6908,6 +6908,7 @@ tests/test/tparray18.pp svneol=native#text/plain
|
||||
tests/test/tparray19.pp svneol=native#text/plain
|
||||
tests/test/tparray2.pp svneol=native#text/plain
|
||||
tests/test/tparray20.pp svneol=native#text/plain
|
||||
tests/test/tparray21.pp svneol=native#text/plain
|
||||
tests/test/tparray3.pp svneol=native#text/plain
|
||||
tests/test/tparray4.pp svneol=native#text/plain
|
||||
tests/test/tparray5.pp svneol=native#text/plain
|
||||
|
@ -781,7 +781,9 @@ implementation
|
||||
end;
|
||||
if not(is_packed_array(left.resultdef)) or
|
||||
((mulsize mod 8 = 0) and
|
||||
ispowerof2(mulsize div 8,temp)) then
|
||||
(ispowerof2(mulsize div 8,temp) or
|
||||
{ only orddefs are bitpacked }
|
||||
not is_ordinal(resultdef))) then
|
||||
begin
|
||||
inc(location.reference.offset,
|
||||
bytemulsize*tordconstnode(right).value);
|
||||
|
15
tests/test/tparray21.pp
Normal file
15
tests/test/tparray21.pp
Normal file
@ -0,0 +1,15 @@
|
||||
{$mode macpas}
|
||||
|
||||
program FatalError_200301231;
|
||||
type
|
||||
note_name_type = packed array[0..17] of string[2];
|
||||
var
|
||||
nn: note_name_type;
|
||||
s: string[ 80];
|
||||
begin
|
||||
nn[1]:= 'x';
|
||||
s:=concat( 'y', nn[ 1]);
|
||||
if (s <> 'yx') then
|
||||
halt(1);
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user