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
On Sun, Apr 28, 2002 at 11:48:15AM -0700, Mark Mitchell wrote:
> I'm confused.
You're not the only one. :) The patch fixes flag_no_inline and breaks
flag_inline_trees/flag_instrument_function_entry_exit as you note.
Does this make more sense?
* c-common.c (c_common_post_options): Turn off inlining when
instrumenting functions rather than when not instrumenting.
Index: gcc/c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.294.2.7
diff -u -p -r1.294.2.7 c-common.c
--- gcc/c-common.c 26 Apr 2002 18:10:32 -0000 1.294.2.7
+++ gcc/c-common.c 28 Apr 2002 23:25:18 -0000
@@ -4134,10 +4134,13 @@ c_common_post_options ()
/* 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_instrument_function_entry_exit)
{
if (!flag_no_inline)
flag_no_inline = 1;
+ }
+ else
+ {
if (flag_inline_functions)
{
flag_inline_trees = 2;
--
Alan Modra
IBM OzLabs - Linux Technology Centre