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 lto/47205] New: GCC emits optimized out noinline function


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47205

           Summary: GCC emits optimized out noinline function
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.g.gorbachev@gmail.com


$ gcc -O2 -flto -fwhole-program main.c foo.c
$ nm a.out | grep foo
08048380 t foo.1988

========= main.c ========
extern int foo(void);

int main(void)
{
  return foo() * 0;
}
=========================

========= foo.c =========
__attribute__((noinline))
int foo(void)
{
  return 0x2a;
}
=========================


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