http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46123
Dave Korn <davek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |davek at gcc dot gnu.org --- Comment #9 from Dave Korn <davek at gcc dot gnu.org> 2010-12-04 06:26:55 UTC --- The testcase is failing for me on i686-pc-cygwin: spawn /gnu/gcc/obj-pr40125/gcc/testsuite/g++/../../g++ -B/gnu/gcc/obj-pr40125/gcc/testsuite/g++/../../ /gnu/gcc/gcc-patched/gcc/testsuite/g++.dg/debug/pr46123.C -nostdinc++ -I/gnu/gcc/obj-pr40125/i686-pc-cygwin/libstdc++-v3/include/i686-pc-cygwin -I/gnu/gcc/obj-pr40125/i686-pc-cygwin/libstdc++-v3/include -I/gnu/gcc/gcc-patched/libstdc++-v3/libsupc++ -I/gnu/gcc/gcc-patched/libstdc++-v3/include/backward -I/gnu/gcc/gcc-patched/libstdc++-v3/testsuite/util -fmessage-length=0 -gdwarf-2 -g -feliminate-dwarf2-dups -S -o pr46123.s /gnu/gcc/gcc-patched/gcc/testsuite/g++.dg/debug/pr46123.C:47:1: internal compiler error: in output_aranges, at dwarf2out.c:11678 It happens here, (gdb) bt #0 0x007c7c70 in fancy_abort ( file=0xe22afc "/gnu/gcc/gcc-patched/gcc/dwarf2out.c", line=11678, function=0xe284b4 "output_aranges") at /gnu/gcc/gcc-patched/gcc/diagnostic.c:101 #1 0x0066b9c1 in dwarf2out_finish ( filename=0x59bccaa "/gnu/gcc/gcc-patched/gcc/testsuite/g++.dg/debug/pr46123. C") at /gnu/gcc/gcc-patched/gcc/dwarf2out.c:1109 ... in dwarf2out.c, where output_aranges() has been inlined into dwarf2out_finish: /* It is necessary not to output these entries if the sections were not used; if the sections were not used, the length will be 0 and the address may end up as 0 if the section is discarded by ld --gc-sections, leaving an invalid (0, 0) entry that can be confused with the terminator. */ if (text_section_used) { dw2_asm_output_addr (DWARF2_ADDR_SIZE, text_section_label, "Address"); dw2_asm_output_delta (DWARF2_ADDR_SIZE, text_end_label, text_section_label, "Length"); } if (cold_text_section_used) { dw2_asm_output_addr (DWARF2_ADDR_SIZE, cold_text_section_label, "Address"); dw2_asm_output_delta (DWARF2_ADDR_SIZE, cold_end_label, cold_text_section_label, "Length"); } for (i = 0; i < arange_table_in_use; i++) { dw_die_ref die = arange_table[i]; /* We shouldn't see aranges for DIEs outside of the main CU. */ gcc_assert (die->die_mark); This assertion triggers on the second address range in the table: (gdb) p arange_table[0][0] $2 = {die_id = {die_symbol = 0x0, die_type_node = 0x0}, die_attr = 0x7ff01400, die_parent = 0x7feb1980, die_child = 0x7feb1b00, die_sib = 0x7feb19e0, die_definition = 0x0, die_offset = 98, die_abbrev = 4, die_mark = 0, die_perennial_p = 0, decl_id = 1705, die_tag = DW_TAG_subprogram} (gdb) p arange_table[1][0] $3 = {die_id = {die_symbol = 0x0, die_type_node = 0x0}, die_attr = 0x7ff816c0, die_parent = 0x7feb0360, die_child = 0x7feb1e00, die_sib = 0x7feb2340, die_definition = 0x0, die_offset = 78, die_abbrev = 9, die_mark = 1, die_perennial_p = 0, decl_id = 1697, die_tag = DW_TAG_subprogram} (gdb) p arange_table[2] $4 = (dw_die_ref) 0x0 (gdb) Any ideas what this could mean?