>Submitter-Id: net >Originator: Christian Haggstrom >Confidential: no >Synopsis: Internal error when mixing inline, extern and static. >Severity: non-critical >Priority: low >Category: c >Class: ice-on-illegal-code >Release: 3.2.1 (Debian testing/unstable) >Environment: System: Linux saturn 2.4.19 #9 Thu Nov 7 16:53:49 CET 2002 i586 unknown unknown GNU/Linux Architecture: i586
host: i386-pc-linux-gnu build: i386-pc-linux-gnu target: i386-pc-linux-gnu configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.2 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-objc-gc i386-linux >Description: gcc-3.2 segfaults when I try to compile this code with optimization enabled >How-To-Repeat: $ cat > test.c inline int a(int x) { return 0; } extern inline void b(void) { } static void b(void) { a(0); } $ gcc-3.2 -O test.c test.c:3: warning: static declaration for `b' follows non-static test.c: In function `b': test.c:3: internal error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. >Fix: The problem can be solved by correcting the code. However, gcc should not crash due to bad input. I have not tried to compile it with the latest snapshot of gcc.