internal compiler error: Segmentation fault occurs in c++ code. Built from gcc 4.2.0 release source. g++ -v: Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2.0/configure --prefix=/local_scratch/owe043/gcc_4_2 --enable-languages=c,c++,fortran Thread model: posix gcc version 4.2.0 To reproduce ICE command is: g++ foo.ii Output of g++ is: foo.cc:118: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Will attach foo.ii.
Created attachment 13619 [details] gzip'ed preprocessed source to reproduce ICE
Reducing.
Created attachment 13621 [details] reduced testcase
Confirmed. Another mangling problem: Program received signal SIGSEGV, Segmentation fault. 0x0827e9b8 in write_expression (expr=0xb7cdd870) at /home/richard/src/trunk2/gcc/cp/mangle.c:2175 warning: Source file is more recent than executable. 2175 write_string (operator_name_info[(int) code].mangled_name); (gdb) print operator_name_info[(int) code] $1 = {identifier = 0x0, name = 0x0, mangled_name = 0x0, arity = 0} (gdb) print code $2 = 214 (gdb) #2 0x08280a16 in write_template_arg (node=0xb7daf540) at /home/richard/src/trunk2/gcc/cp/mangle.c:2363 2363 write_expression (node); (gdb) call debug_tree(node) <addr_expr 0xb7daf540 arg 0 <template_id_expr 0xb7cdd870 type <lang_type 0xb7d61d80 unknown type type <lang_type 0xb7d61d80 unknown type> VOID align 1 symtab 0 alias set -1 canonical type 0xb7d61d80 pointer_to_this <lang_type 0xb7d61d80 unknown type> reference_to_this <lang_type 0xb7d61d80 unknown type>> arg 0 <overload 0xb7db1a9c type <lang_type 0xb7d61d80 unknown type> function <template_decl 0xb7db3b64 direct_context_cast>> arg 1 <tree_vec 0xb7db632c elt 0 <template_type_parm 0xb7db5654 Iface>>>>
Fixed in 4.5.x.