http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51852
--- Comment #3 from Nathan Ridge <zeratul976 at hotmail dot com> 2012-01-14 07:11:43 UTC --- Here is stack trace of cc1plus at the point where it prints garbage: #0 tree_check_failed (node=0x7fffdc568b40, file=0xf8f214 "../../src/gcc/cp/pt.c", line=1687, function=0xf94cd0 "eq_local_specializations") at ../../src/gcc/tree.c:8822 #1 0x0000000000533f71 in eq_local_specializations (p1=Unhandled dwarf expression opcode 0xf3 ) at ../../src/gcc/cp/pt.c:1687 #2 eq_local_specializations (p1=Unhandled dwarf expression opcode 0xf3 ) at ../../src/gcc/cp/pt.c:1685 #3 0x0000000000f7aa4b in htab_find_with_hash (htab=0x2305090, element=0x7fffede2f908, hash=4256980769) at ../../src/libiberty/hashtab.c:606 #4 0x00000000005310b5 in retrieve_local_specialization (tmpl=0x7fffede2f908) at ../../src/gcc/cp/pt.c:1087 #5 0x0000000000562d1e in tsubst_decl (t=0x7fffede2f908, args=0x7fffd78a55a0, complain=3) at ../../src/gcc/cp/pt.c:10396 #6 0x000000000055ad35 in tsubst (t=0x7fffede2f908, args=0x7fffd78a55a0, complain=3, in_decl=Unhandled dwarf expression opcode 0xf3 ) at ../../src/gcc/cp/pt.c:11114 #7 tsubst (t=0x7fffede2f908, args=0x7fffd78a55a0, complain=3, in_decl=Unhandled dwarf expression opcode 0xf3 ) at ../../src/gcc/cp/pt.c:11099 #8 0x00000000005625de in tsubst_decl (t=Unhandled dwarf expression opcode 0xf3 ) at ../../src/gcc/cp/pt.c:10490 #9 0x000000000055ad35 in tsubst (t=0x7fffede2f990, args=0x7fffd78a55a0, complain=3, in_decl=Unhandled dwarf expression opcode 0xf3 ) at ../../src/gcc/cp/pt.c:11114 #10 tsubst (t=0x7fffede2f990, args=0x7fffd78a55a0, complain=3, in_decl=Unhandled dwarf expression opcode 0xf3 ) at ../../src/gcc/cp/pt.c:11099 #11 0x000000000057ea8e in instantiate_decl (d=0x7fffd7c8ac00, defer_ok=<value optimized out>, expl_inst_class_mem_p=false) at ../../src/gcc/cp/pt.c:18534 #12 0x00000000005878cc in instantiate_pending_templates (retries=Unhandled dwarf expression opcode 0xf3 ) at ../../src/gcc/cp/pt.c:18828 #13 0x00000000005bebf4 in cp_write_global_declarations () at ../../src/gcc/cp/decl2.c:3763 #14 0x0000000000a3b7cc in compile_file (argc=36, argv=0x7fffffffe268) at ../../src/gcc/toplev.c:573 #15 do_compile (argc=36, argv=0x7fffffffe268) at ../../src/gcc/toplev.c:1938 #16 toplev_main (argc=36, argv=0x7fffffffe268) at ../../src/gcc/toplev.c:2014 #17 0x00007ffff6f06c4d in __libc_start_main () from /lib/libc.so.6 #18 0x00000000004e3921 in _start () The message "Unhandled dwarf expression opcode 0xf3" stands out - does this help diagnose the problem? I can give values of local variables too if you tell me which ones.