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/16450] New: Nested function inlining bug in 3.4.x


/* { dg-do compile } */
/* { dg-options "-O2" } */

int foo (int x)
{
  int i = x;
  inline __attribute__((always_inline)) int bar (void)
  {
    return i;
  }
  return bar ();
}

/* { dg-final { scan-assembler-not "bar.0" } } */

fails in 3.4.x, doesn't fail in 3.3.x or on the trunk.
This is quite serious bug, as it extremely bloats e.g. glibc dynamic linker.
A nested function body is emitted even when it is never used.

-- 
           Summary: Nested function inlining bug in 3.4.x
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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