This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/27734] New: always inline fails with function body unavailable error
- From: "raj dot khem at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 May 2006 21:09:15 -0000
- Subject: [Bug c/27734] New: always inline fails with function body unavailable error
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This problem is seen while compiling linux kernel 2.6.16 with GCC 4.x
when compiling the below test case. Compiler produced errors attached at the
bottom. This does not happen with GCC 3.4.x but I could reproduce this with GCC
4.0 GCC 4.1.0 GCC 4.1.1 and GCC 4.2(trunk)
xx.c
==========================
static inline __attribute__((always_inline)) int foo(void *p)
{
return 0;
}
inline __attribute__((always_inline)) int bar(void *p)
{
return 0;
}
void baz(void *p)
{
if (bar(p))
foo(p);
}
=====================
how to reproduce
gcc -c xx.c
=========================
errors as seen:
xx.c: In function 'baz':
xx.c:7: sorry, unimplemented: inlining failed in call to 'bar': function body
not available
xx.c:12: sorry, unimplemented: called from here
--
Summary: always inline fails with function body unavailable error
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: raj dot khem at gmail dot com
GCC build triplet: i386-redhat-linux
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27734