The "extern" declaration below probably doesn't make much sense. But when putting this code into a C++ file (not C!)
void foo() { } void bar() { extern void foo(); foo(); } and compiling this with (the -g is important) gcc -c -g test.cpp I get this error: /tmp/test.cpp: In function `void bar()': /tmp/test.cpp:9: internal compiler error: in gen_subprogram_die, at dwarf2out.c:11183 gcc is from today's CVS HEAD. g++ -v gives: Reading specs from /opt/gcc-4.0/lib/gcc/i686-pc-linux-gnu/4.0.0/specs Configured with: /home/porten/gcc/configure --enable-languages=c,c++ --prefix=/opt/gcc-4.0 Thread model: posix gcc version 4.0.0 20041015 (experimental) -- Summary: ICE on dubious extern declaration Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: porten at kde dot org CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18018