------- Comment #14 from ubizjak at gmail dot com 2007-12-27 12:32 ------- (In reply to comment #13) > For some reason it works correctly on i386-apple-darwin and > powerpc-linux-gnu. > I wonder if something is not miscompiling the C++ front-end.
No, I have build non-bootstrapped gcc with gcc-4.1 and it still shows the same problem. Adding a "debug_tree (t)" at the top of find_parameter_packs_r() in cp/pt.c results in: <array_ref 0x2aaaadfef5a0 arg 0 <cast_expr 0x2aaaae129c40 type <template_type_parm 0x2aaaae1383c0 T type_0 type_6 VOID align 8 symtab 0 alias set -1 canonical type 0x2aaaae1383c0 index 0 level 1 orig_level 1 chain <type_decl 0x2aaaae138480 T>> side-effects> arg 1 <integer_cst 0x2aaaae00b480 type <integer_type 0x2aaaadffd540 int> constant invariant 0> arg 2 <integer_cst 0x2aaaae00b480 0>pr34397.cpp:3: internal compiler error: Segmentation fault <...> The segfault now points to: Program received signal SIGSEGV, Segmentation fault. print_node (file=0x30d1948860, prefix=0x7fffc27c5510 "arg 3", node=0x17, indent=4) at ../../gcc-svn/trunk/gcc/print-tree.c:197 197 code = TREE_CODE (node); So, we can conclude that something is wrong with arg 3 of ARRAY_REF expr. Perhaps it is left uninitialized? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34397