mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 07:40:27 +02:00
* we cannot do SSA during partial writes to arrays which span multiple registers, resolves #39325
This commit is contained in:
parent
4d8ecfb422
commit
1f272f8f90
@ -688,7 +688,8 @@ implementation
|
||||
fmodule,
|
||||
verbose,defutil,paramgr,
|
||||
symtable,
|
||||
nbas,ncon,nld,ncgrtti,pass_2,
|
||||
nbas,ncon,nld,nmem,
|
||||
ncgrtti,pass_2,
|
||||
cgobj,cutils,procinfo,
|
||||
{$ifdef x86}
|
||||
cgx86,
|
||||
@ -4652,6 +4653,11 @@ implementation
|
||||
inn,
|
||||
asn,isn:
|
||||
result := fen_norecurse_false;
|
||||
vecn:
|
||||
{ we cannot do SSA during partial writes to arrays which span multiple registers, see also tw39325 }
|
||||
if (tvecnode(n).left.location.loc in [LOC_CREGISTER,LOC_CFPUREGISTER,LOC_CMMXREGISTER,LOC_CMMREGISTER]) and
|
||||
(tcgsize2size[reg_cgsize(tvecnode(n).left.location.register)]<>tvecnode(n).left.resultdef.size) then
|
||||
result := fen_norecurse_false;
|
||||
else
|
||||
;
|
||||
end;
|
||||
|
8
tests/webtbs/tw39325.pp
Normal file
8
tests/webtbs/tw39325.pp
Normal file
@ -0,0 +1,8 @@
|
||||
{ %OPT=-Ooregvar }
|
||||
program testopt;
|
||||
var
|
||||
ar: array[0..1] of byte;
|
||||
begin
|
||||
ar[0] := 1;
|
||||
ar[1] := 2;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user