This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/15366] New: -fno-inline-functions ignored by tree inliner for static functions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]