This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 3.1 bug: flag_no_inline incorrectly set
- From: Mark Mitchell <mark at codesourcery dot com>
- To: "David S. Miller" <davem at redhat dot com>, "anton at samba dot org" <anton at samba dot org>
- Cc: "gcc-bugs at gcc dot gnu dot org" <gcc-bugs at gcc dot gnu dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 28 Apr 2002 11:48:15 -0700
- Subject: Re: gcc 3.1 bug: flag_no_inline incorrectly set
- References: <20020428054450.GA17500@krispykreme><20020427.225235.08665315.davem@redhat.com>
--On Saturday, April 27, 2002 10:52:35 PM -0700 "David S. Miller"
<davem@redhat.com> wrote:
> From: Anton Blanchard <anton@samba.org>
> Date: Sun, 28 Apr 2002 15:44:51 +1000
>
> I was chasing down why -Winline doesnt work with gcc 3.1 and noticed
> that we were always setting flag_no_inline. With some help from
> Alan Modra, we narrowed it down to c_common_post_options where
> the check for flag_instrument_function_entry_exit looks backwards.
>
> ...
>
> This change looks correct, and I recommend that it be approved for
> both the mainline and 3.1 branch.
>
> Mark?
I don't understand why the code is wrong. It says:
/* Use tree inlining if possible. Function instrumentation is only
done in the RTL level, so we disable tree inlining. */
if (! flag_instrument_function_entry_exit)
{
if (!flag_no_inline)
flag_no_inline = 1;
if (flag_inline_functions)
{
flag_inline_trees = 2;
flag_inline_functions = 0;
}
}
That says "if we're not instrumenting function entry/exit, then turn
on flag_inline_trees, at least sometimes." With the change, if
flag_inline_functions is also true, we'd end up turning on flag_inline_trees
*and* flag_instrument_function_entry_exit, which apparently doens't work,
right?
I'm confused.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com