Bug 23474 - gcc segfaults when inlined function is redefined after use
Summary: gcc segfaults when inlined function is redefined after use
Status: RESOLVED DUPLICATE of bug 22052
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.0.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-19 02:33 UTC by Eric Cooper
Modified: 2005-08-19 02:36 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Cooper 2005-08-19 02:33:18 UTC
The following code causes Debian's gcc-4.0 to segfault:

static inline __attribute__((always_inline)) void f(void) {}
static inline void g(void) { f(); }
static inline void f(void) {}
void bug(void) { g(); }

gcc -v:
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib --enable-nls
--without-included-gettext --enable-threads=posix --program-suffix=-4.0
--enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre
--enable-mpfr --disable-werror --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.2 20050806 (prerelease) (Debian 4.0.1-4)
Comment 1 Andrew Pinski 2005-08-19 02:36:04 UTC

*** This bug has been marked as a duplicate of 22052 ***