This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15366] New: -fno-inline-functions ignored by tree inliner for static functions
- From: "nigel at mips dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2004 15:20:04 -0000
- Subject: [Bug c/15366] New: -fno-inline-functions ignored by tree inliner for static functions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The -fno-inline-functions option is ignored by the tree inliner in gcc-3.4 for
static functions, even at -O2 where according to the manual it shouldn't be
enabled in the first place. For example:
static int local (int a)
{
return a;
}
int global (int a)
{
return a;
}
int test (int a, int b)
{
return local (a) * global (b);
}
Compile with "-O2" or "-O3 -fno-inline-functions" and see that local() is
inlined into test(), but global() is not. This may be intentional, but it is
confusing since the manual suggests it should be otherwise, in which case this
is a documentation bug.
--
Summary: -fno-inline-functions ignored by tree inliner for static
functions
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nigel at mips dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: mipsisa32-unknown-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15366