https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63546

            Bug ID: 63546
           Summary: ICE: Segmentation fault in lto_get_decl_name_mapping
                    on ppc64
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org

trippels@gcc1-power7 ~ % cat timezone.ii
class UnicodeString
{
public:
  void m_fn1 ();
} a;
void
fn1 ()
{
  static int b = 0;
  a.m_fn1 ();
}

trippels@gcc1-power7 ~ % /home/trippels/gcc_test/usr/local/bin/c++ -flto
-fdata-sections -g -O2 -r -nostdlib timezone.ii
lto1: internal compiler error: Segmentation fault
0x1063d46b crash_signal
        ../../gcc/gcc/toplev.c:340
0x104ed8c4 lto_get_decl_name_mapping(lto_file_decl_data*, char const*)
        ../../gcc/gcc/lto-section-in.c:340
0x1098f447 varpool_node::get_constructor()
        ../../gcc/gcc/varpool.c:280
0x1098f447 varpool_node::get_constructor()
        ../../gcc/gcc/varpool.c:264
0x10981c4f get_variable_section(tree_node*, bool)
        ../../gcc/gcc/varasm.c:1121
0x10983ae3 get_block_for_decl
        ../../gcc/gcc/varasm.c:1194
0x1098663b make_decl_rtl(tree_node*)
        ../../gcc/gcc/varasm.c:1419
0x10989f43 make_decl_rtl_for_debug(tree_node*)
        ../../gcc/gcc/varasm.c:1467
0x102523f7 rtl_for_decl_location
        ../../gcc/gcc/dwarf2out.c:15760
0x102871e7 loc_list_from_tree
        ../../gcc/gcc/dwarf2out.c:14391
0x1028dc13 add_location_or_const_value_attribute
        ../../gcc/gcc/dwarf2out.c:15892
0x1028dc13 add_location_or_const_value_attribute
        ../../gcc/gcc/dwarf2out.c:15836
0x10297707 dwarf2out_finish
        ../../gcc/gcc/dwarf2out.c:24243
Please submit a full bug report,
with preprocessed source if appropriate.
(gdb) up
#3  0x0000000010981c50 in get_variable_section (decl=0x3fffaf7003f0,
prefer_noswitch_p=<optimized out>) at ../../gcc/gcc/varasm.c:1121
1121    ../../gcc/gcc/varasm.c: No such file or directory.
(gdb) p debug_tree(decl)
 <var_decl 0x3fffaf7003f0 b
    type <integer_type 0x3fffaf6b07e0 int asm_written public SI
        size <integer_cst 0x3fffaf681380 constant 32>
        unit size <integer_cst 0x3fffaf681398 constant 4>
        align 32 symtab 16383 alias set -1 canonical type 0x3fffaf6b07e0
precision 32 min <integer_cst 0x3fffaf681338 -2147483648> max <integer_cst
0x3fffaf681350 2147483647>
        pointer_to_this <pointer_type 0x3fffaf6b1848>>
    static SI file timezone.ii line 9 col 14 size <integer_cst 0x3fffaf681380
32> unit size <integer_cst 0x3fffaf681398 4>
    align 32 context <function_decl 0x3fffaf843018 fn1> initial <error_mark
0x3fffaf681128>>
$1 = void

Reply via email to