Re: Side effect of -finline-functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Thu, 3 May 2012, Mathieu Malaterre wrote:

> Hi all,
>   We are currently tracking an issue within the openjpeg codebase. One
> user reported that compilation with -O3 leads to incorrect result
> decompressing a particular image. He also noticed that compilation
> with -O2 -fgcse-after-reload  -fipa-cp-clone -fpredictive-commoning
> -ftree-vectorize -funswitch-loops does not produce any artefact.
> Therefore we concluded that the only possible side effect would be
> generated by the flag -finline-functions
> Is there some kind of tools that could help us locate exactly which
> function is producing a different output with this flag ?

I'm not aware of such tool.  However, what you can do is to find a file that
contains a function that behaves differently with -finline-functions flag. By
splitting that file further, you may be able to find a set of functions that
behave differently with inlining.

To do that, prepare a two sets of openjpeg's object files: one "good" without
-finline-functions flag used for compilation, and the other "bad" -- with that
flag.  Then compile the executable from complementing subsets of each set,
until a single file from "bad" set is proven to produce an incorrect result.
Refer to for scripts that
automate this job (ignore the part about debug counters as inlining does not
have any).

Hope that helps,

[Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

Add to Google