The following sequence produces an ICE in gcc-3.4.4: $ cat > foo.C <<FOO namespace N { class X {}; class Y { Y(const X&); }; void b(); void a() { b(); Y z(X()); } } FOO $ g++-3.4.4 -save-temps -v -g -O3 -fno-unit-at-a-time -c foo.C Reading specs from /work/external/wwc/prgcc/lib/gcc/sparc-sun-solaris2.8/3.4.4/specs Configured with: ../gcc-3.4.4/configure --prefix=/work/external/wwc/prgcc --program-suffix=-3.4.4 --enable-threads --with-included-gettext --enable-languages=c,c++,f77 --with-gnu-as --with-as=/work/external/wwc/prodbinu216/bin/as --with-gnu-ld --with-ld=/work/external/wwc/prodbinu216/bin/ld : (reconfigured) ../gcc-3.4.4/configure --prefix=/work/external/wwc/prgcc --program-suffix=-3.4.4 --enable-threads --with-included-gettext --enable-languages=c,c++,f77 --with-gnu-as --with-as=/work/external/wwc/prodbinu216/bin/as --with-gnu-ld --with-ld=/work/external/wwc/prodbinu216/bin/ld Thread model: posix gcc version 3.4.4 /work/external/wwc/prgcc/libexec/gcc/sparc-sun-solaris2.8/3.4.4/cc1plus -E -quiet -v foo.C -mcpu=v7 -fno-unit-at-a-time -fworking-directory -O3 -o foo.ii ignoring nonexistent directory "/work/external/wwc/prgcc/lib/gcc/sparc-sun-solaris2.8/3.4.4/../../../../sparc-sun-solaris2.8/include" #include "..." search starts here: #include <...> search starts here: /work/external/wwc/prgcc/lib/gcc/sparc-sun-solaris2.8/3.4.4/../../../../include/c++/3.4.4 /work/external/wwc/prgcc/lib/gcc/sparc-sun-solaris2.8/3.4.4/../../../../include/c++/3.4.4/sparc-sun-solaris2.8 /work/external/wwc/prgcc/lib/gcc/sparc-sun-solaris2.8/3.4.4/../../../../include/c++/3.4.4/backward /usr/local/include /work/external/wwc/prgcc/include /work/external/wwc/prgcc/lib/gcc/sparc-sun-solaris2.8/3.4.4/include /usr/include End of search list. /work/external/wwc/prgcc/libexec/gcc/sparc-sun-solaris2.8/3.4.4/cc1plus -fpreprocessed foo.ii -quiet -dumpbase foo.C -mcpu=v7 -auxbase foo -g -O3 -version -fno-unit-at-a-time -o foo.s GNU C++ version 3.4.4 (sparc-sun-solaris2.8) compiled by GNU C version 3.4.4. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 foo.C: In function `void N::a()': foo.C:5: internal compiler error: in gen_subprogram_die, at dwarf2out.c:10854 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. $ cat foo.s .file "foo.C" .section ".debug_abbrev" .LLdebug_abbrev0: .section ".debug_info" .LLdebug_info0: .section ".debug_line" .LLdebug_line0: .section ".text" .LLtext0: .align 4 .global _ZN1N1aEv .type _ZN1N1aEv, #function .proc 020 _ZN1N1aEv: .LLFB2: .LLM1: !#PROLOGUE# 0 !#PROLOGUE# 1 .LLBB2: .LLBB3: or %o7, %g0, %g1 call _ZN1N1bEv, 0 or %g1, %g0, %o7 .LLBE3: .LLBE2: nop .LLFE2: .size _ZN1N1aEv, .-_ZN1N1aEv
Let me know if you need more information. -- David Magerman [EMAIL PROTECTED] -- Summary: -fno-unit-at-a-time causes ICE in gcc-3.4.4 on solaris2.8 Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: magerman at rentec dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: sparc-sun-solaris2.8 GCC host triplet: sparc-sun-solaris2.8 GCC target triplet: sparc-sun-solaris2.8 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21932