[fpc-devel] {$INLINE off}

Martin Frb lazarus at mfriebe.de
Sat May 9 20:54:36 CEST 2015

On 09/05/2015 19:25, Sven Barth wrote:
> On 09.05.2015 18:12, Martin Frb wrote:
>> Are there any known conditions, in which inlining is applied, despite a
>> {$INLINE off}
>> on top of the unit?
>> (fpc trunk and 2.6.4)
> $INLINE OFF only tells the compiler not to generate inlining 
> information for functions (either explicitely using "inline" or 
> automatically because the autoinline optimization is enabled). It does 
> however not stop the compiler from inlining methods that /do/ have 
> inline information (because they are from a different unit for example).

It does not work for me in units. fpc trunk r30815.

If I copy all the code into the main project, then it works (and I get 
all the hints, about inlining disabled.).

But the above, stopping with the debugger, and stepping in:
- there is on "call" instruction from "main" to "x1"
- and then there is no further call, the body of this function already 
has the writeln
yet it should have calls to the other methods.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_inline.zip
Type: application/zip
Size: 589 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20150509/1fa9e71f/attachment.zip>

More information about the fpc-devel mailing list