http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46911
Summary: [4.6 Regression] ICE: SIGSEGV in add_name_and_src_coords_attributes (dwarf2out.c:17792) with -flto -g Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: zso...@seznam.cz Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu ----- testcase.f ----- common/main1/ eps(2) call dalie6s(iqmod6,1,wx,cor6d) end ---------------------- reduced from gfortran.dg/lto/20091015-1_2.f Compiler output: $ gfortran -O -finline-small-functions -flto -g testcase.f -r -nostdlib ==5279== Invalid read of size 2 ==5279== at 0x5C75BC: add_name_and_src_coords_attributes (dwarf2out.c:17792) ==5279== by 0x5D8104: gen_variable_die (dwarf2out.c:19400) ==5279== by 0x5DCF14: gen_decl_die (dwarf2out.c:20981) ==5279== by 0x5DA34A: decls_for_scope (dwarf2out.c:20555) ==5279== by 0x5DF38B: gen_block_die (dwarf2out.c:19669) ==5279== by 0x5DA37D: decls_for_scope (dwarf2out.c:20567) ==5279== by 0x5DF582: gen_block_die (dwarf2out.c:19701) ==5279== by 0x5DA37D: decls_for_scope (dwarf2out.c:20567) ==5279== by 0x5DA8FF: gen_subprogram_die (dwarf2out.c:19277) ==5279== by 0x5DCDA2: gen_decl_die (dwarf2out.c:20914) ==5279== by 0x5E00E8: dwarf2out_function_decl (dwarf2out.c:21296) ==5279== by 0x638FCC: rest_of_handle_final (final.c:4286) ==5279== by 0x771ADE: execute_one_pass (passes.c:1553) ==5279== by 0x771DA4: execute_pass_list (passes.c:1608) ==5279== by 0x771DB6: execute_pass_list (passes.c:1609) ==5279== by 0x771DB6: execute_pass_list (passes.c:1609) ==5279== by 0x8B2605: tree_rest_of_compilation (tree-optimize.c:422) ==5279== by 0xA77EB1: cgraph_expand_function (cgraphunit.c:1508) ==5279== by 0xA7A489: cgraph_optimize (cgraphunit.c:1567) ==5279== by 0x4FF78E: lto_main (lto.c:2453) ==5279== by 0x85BDE7: toplev_main (toplev.c:579) ==5279== by 0x6369BBC: (below main) (in /lib64/libc-2.11.2.so) ==5279== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==5279== In file included from :0:0: testcase.f: In function 'main': testcase.f:3:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: /mnt/svn/gcc-trunk/binary-167643-lto-fortran-checking-yes-rtl-df/bin/gfortran returned 1 exit status collect2: lto-wrapper returned 1 exit status Tested revisions: r167643 - crash r165699 - crash r161659 - OK 4.5 r166509 - OK