mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-02-06 04:30:13 +00:00
Fix bug in code generation for the product of two constants.
This was a problem introduced in commit 393b7304a05. It could cause a compiler error for unoptimized array indexing code, e.g.: int a[100]; int main(void) { return a[5]; }
This commit is contained in:
parent
00e7fe7125
commit
054719aab2
2
Gen.pas
2
Gen.pas
@ -6456,7 +6456,7 @@ procedure GenTree {op: icptr};
|
||||
nd := op^.left;
|
||||
end; {else}
|
||||
if nd^.opcode = pc_ldc then
|
||||
GenNative(m_lda_imm, immediate, long(ord4(val) * nd^.q).lsw, nil, 0)
|
||||
GenNative(m_lda_imm, immediate, ord(ord4(val) * ord4(nd^.q)), nil, 0)
|
||||
else begin
|
||||
GenTree(nd);
|
||||
case val of
|
||||
|
Loading…
x
Reference in New Issue
Block a user