This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23296] Combination of -finstrument-functions and -O3 produces incorrect results
- From: "bart dot vanassche at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Aug 2005 17:52:57 -0000
- Subject: [Bug c++/23296] Combination of -finstrument-functions and -O3 produces incorrect results
- References: <20050809055446.23296.bart.vanassche@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bart dot vanassche at gmail dot com 2005-08-09 17:52 -------
Subject: Re: Combination of -finstrument-functions and -O3 produces incorrect results
Hello pinskia,
Thanks for the info -- I recompiled the code with the extra
option -fno-inline, and so I got the results I desired. The reason why
I am using -finstrument-functions is that I have written a profiler
that uses function instrumentation in order to detect which functions
are called during execution.
I understand now why function instrumentation does not give
reliable execution information in combination with inlining. Maybe
it's wise to let gcc 4 produce a warning when both function
instrumentation and inlining are turned on, so that other developers
are informed about this behaviour ? My suggestion is to print the
following warning for the combination of function instrumentation and
inlining:
Warning: function instrumentation does not work correctly when
inlining is turned on. Use -fno-inline to turn off inlining.
Regards,
Bart Van Assche.
On 9 Aug 2005 11:45:47 -0000, pinskia at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-09 11:45 -------
> This is not a bug, this is how it works now in 4.0.0 and above with respect with the inliner.
>
> --
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|UNCONFIRMED |RESOLVED
> Resolution| |INVALID
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23296
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23296