[fpc-devel] Does FPC optimize unused parameters ?
jonas.maebe at elis.ugent.be
Sun Aug 26 23:07:08 CEST 2012
On 26 Aug 2012, at 21:17, Florian Klaempfl wrote:
>> That looks like a very serious bug introduced in the handling of
>> parameters to inlined routines. Florian changed several things there
>> over the last couple of months, maybe he has an idea.
> Yes, r21445 is guilty. para.left should be checked with might_have_sideeffects if refs=0 if it really could be removed.
I've added that, and additionally made this optimization only active if the new -Oodeadvalues optimization switch is used (it's also part of -O4), because it can change the behaviour of code due to the removal of implicit side-effects caused by the original calculation of those parameters (range check errors, segmentation faults, ...).
More information about the fpc-devel