mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 11:09:19 +02:00
* allow also CSUBSETREG in tx86inlinenode.second_IncludeExclude, resolves #38733
git-svn-id: trunk@49151 -
This commit is contained in:
parent
ca475537e8
commit
b09669dffe
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -18775,6 +18775,7 @@ tests/webtbs/tw3865.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw38695.pp svneol=native#text/pascal
|
tests/webtbs/tw38695.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3870.pp svneol=native#text/plain
|
tests/webtbs/tw3870.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw38703.pp svneol=native#text/pascal
|
tests/webtbs/tw38703.pp svneol=native#text/pascal
|
||||||
|
tests/webtbs/tw38733.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw3893.pp svneol=native#text/plain
|
tests/webtbs/tw3893.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3898.pp svneol=native#text/plain
|
tests/webtbs/tw3898.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw3899.pp svneol=native#text/plain
|
tests/webtbs/tw3899.pp svneol=native#text/plain
|
||||||
|
@ -1075,8 +1075,9 @@ implementation
|
|||||||
((tcallparanode(tcallparanode(left).right).left.location.value-setbase) div bitsperop)*tcgsize2size[opsize]);
|
((tcallparanode(tcallparanode(left).right).left.location.value-setbase) div bitsperop)*tcgsize2size[opsize]);
|
||||||
cg.a_op_const_ref(current_asmdata.CurrAsmList,cgop,opsize,l,tcallparanode(left).left.location.reference);
|
cg.a_op_const_ref(current_asmdata.CurrAsmList,cgop,opsize,l,tcallparanode(left).left.location.reference);
|
||||||
end;
|
end;
|
||||||
|
LOC_CSUBSETREG,
|
||||||
LOC_CREGISTER :
|
LOC_CREGISTER :
|
||||||
cg.a_op_const_reg(current_asmdata.CurrAsmList,cgop,tcallparanode(left).left.location.size,l,tcallparanode(left).left.location.register);
|
hlcg.a_op_const_loc(current_asmdata.CurrAsmList,cgop,tcallparanode(left).left.resultdef,l,tcallparanode(left).left.location);
|
||||||
else
|
else
|
||||||
internalerror(200405022);
|
internalerror(200405022);
|
||||||
end;
|
end;
|
||||||
|
38
tests/webtbs/tw38733.pp
Normal file
38
tests/webtbs/tw38733.pp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
type
|
||||||
|
TSimpleEnum = (seOne, seTwo);
|
||||||
|
TSimpleSet = set of TSimpleEnum;
|
||||||
|
|
||||||
|
TRecordWithSet = record
|
||||||
|
TheSet : TSimpleSet;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function FirstFunc:TRecordWithSet;
|
||||||
|
begin
|
||||||
|
FirstFunc.TheSet := [];
|
||||||
|
|
||||||
|
//below would work fine
|
||||||
|
//FirstFunc.TheSet := FirstFunc.TheSet + [seOne];
|
||||||
|
|
||||||
|
//below line causes error "Fatal: Internal error 200405022"
|
||||||
|
Include(FirstFunc.TheSet, seOne);
|
||||||
|
if not(seOne in FirstFunc.TheSet) then
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
//absolute variable overlaying Result doesn't help
|
||||||
|
function SecondFunc:TRecordWithSet;
|
||||||
|
var
|
||||||
|
LocalAbs : TRecordWithSet absolute SecondFunc;
|
||||||
|
begin
|
||||||
|
LocalAbs.TheSet := [];
|
||||||
|
//below line would cause same error
|
||||||
|
Include(LocalAbs.TheSet, seOne);
|
||||||
|
if not(seOne in LocalAbs.TheSet) then
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Collected : TRecordWithSet;
|
||||||
|
begin
|
||||||
|
Collected := FirstFunc;
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user