Disabling parts of the optimiser Each part of the optimiser can be separately disabled using flags. This is to help isolate issues that might be difficult to find otherwise. It should not be used for 'production code'. Each flag is of the form {$OPTI xxx} To isolate the part of the optimiser causing the problem, put the following lines at the top of your main code. {$OPTI NO_REDUNDANT_FRAME_USAGE_OPT} {$OPTI NO_OPT_OFFSET_LOADS} {$OPTI NO_CHECK_REDUNDANT_LOAD} {$OPTI NO_CHECK_REDUNDANT_FRAME_LOAD} {$OPTI NO_CHECK_REDUNDANT_SAVE} {$OPTI NO_CHECK_MOV} {$OPTI NO_CHECK_RETURN_REGS} {$OPTI NO_LOOP_OPT} {$OPTI NO_OPT_LOOP_LOADS} {$OPTI NO_BRANCH_OPT} {$OPTI NO_CSE_OPT} {$OPTI No_Remove_Code_Islands} {$OPTI No_Opt_Final_MOV} {$OPTI NO_COM_OPT} {$OPTI NO_OPT_TST} {$OPTI NO_BITTEST_OPT} {$OPTI NO_OPT_CPI} {$OPTI NO_CALL_FRAME_OPT} {$OPTI NO_CALL_FRAME_OPT_LOCAL} {$OPTI NO_OPT_LOCAL_VARS} {$OPTI NO_OPT_LOCAL_VARS2} {$OPTI NO_OPT_LOCAL_VARS3} {$OPTI NO_ALLOW_INLINE} {$OPTI No_Phase_4} {$OPTI No_Phase_3} {$OPTI No_Phase_2_OR_3} {$OPTI No_Phase_1_2_OR_3} This effectively disables every part of the optimiser, so a compile and optimise now should have the same effect as just compiling. To reintroduce an optimisation comment out the line associated with that optimisation, for example //{$OPTI No_Phase_1_2_OR_3} or { $OPTI No_Phase_1_2_OR_3} (note the space between { and $) Reintroduce the optimisations one by one until the problem re-appears, and advise me of the results. I recommend reintroducing from the bottom upwards. Merlin.