diff --git a/Gen.pas b/Gen.pas index c9b2146..82f5c2f 100644 --- a/Gen.pas +++ b/Gen.pas @@ -321,6 +321,7 @@ case op^.opcode of loc := LabelToDisp(op^.left^.r) + op^.left^.q; if (op^.left^.opcode <> pc_lod) or (loc > 255) then Error(cge1); + offset := offset + op^.q; if offset = 0 then GenNative(mop, direct, loc, nil, 0) else begin diff --git a/cc.notes b/cc.notes index efd3583..d82ea86 100644 --- a/cc.notes +++ b/cc.notes @@ -1622,6 +1622,8 @@ If you use #pragma debug 0x0010 to enable stack check debug code, the compiler w 16. When an expression of const- or volatile-qualified struct or union type was passed as a function parameter, incorrect code would be generated. This could lead to incorrect program behavior or crashes. +17. Incorrect code could sometimes be generated if a long long or unsigned long long value was a non-initial member of a structure, and it was accessed through a pointer to the structure and used as an operand of certain arithmetic, bitwise, or comparison operators. + -- Bugs from C 2.1.1 B3 that have been fixed in C 2.2.0 --------------------- 1. There were various bugs that could cause incorrect code to be generated in certain cases. Some of these were specific to certain optimization passes, alone or in combination.