public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15366] New: -fno-inline-functions ignored by tree inliner for static functions
@ 2004-05-10 15:20 nigel at mips dot com
  2004-05-10 15:27 ` [Bug optimization/15366] [unit-at-a-time] -fno-inline-functions is ignored " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: nigel at mips dot com @ 2004-05-10 15:20 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2005-09-02  8:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-10 15:20 [Bug c/15366] New: -fno-inline-functions ignored by tree inliner for static functions nigel at mips dot com
2004-05-10 15:27 ` [Bug optimization/15366] [unit-at-a-time] -fno-inline-functions is ignored " pinskia at gcc dot gnu dot org
2004-06-17 17:47 ` [Bug rtl-optimization/15366] " pinskia at gcc dot gnu dot org
2004-08-19 21:12 ` mmitchel at gcc dot gnu dot org
2004-08-19 23:01 ` jh at suse dot cz
2004-08-29 19:02 ` mmitchel at gcc dot gnu dot org
2004-11-01  0:45 ` mmitchel at gcc dot gnu dot org
2005-05-19 17:44 ` mmitchel at gcc dot gnu dot org
2005-07-26 21:34 ` nomura at netapp dot com
2005-08-31 13:13 ` [Bug tree-optimization/15366] " rguenth at gcc dot gnu dot org
2005-08-31 13:14 ` rguenth at gcc dot gnu dot org
2005-09-01  8:55 ` cvs-commit at gcc dot gnu dot org
2005-09-01  9:14 ` bobbymcn at bellsouth dot net
2005-09-02  8:13 ` cvs-commit at gcc dot gnu dot org
2005-09-02  8:14 ` [Bug tree-optimization/15366] [3.4 only][unit-at-a-time] " rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).