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

            Bug ID: 78191
           Summary: [7 regression] ICE in calc_die_sizes
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---
              Host: *-*-solaris2.10
            Target: *-*-solaris2.10
             Build: *-*-solaris2.10

Created attachment 39950
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39950&action=edit
preprocessed input

Between r241708 (ok) and r241723 (bad), Solaris 10 bootstrap started to break
compiling a couple of files in libstdc++ (both sparc and x86, 64-bit only):

/vol/gcc/src/hg/trunk/local/libstdc++-v3/src/c++11/ostream-inst.cc:98:1:
internal compiler error: in calc_die_sizes, at dwarf2out.c:9008
 } // namespace
 ^
0x88a01ba calc_die_sizes
        /vol/gcc/src/hg/trunk/local/gcc/dwarf2out.c:9007
0x88a0205 calc_die_sizes
        /vol/gcc/src/hg/trunk/local/gcc/dwarf2out.c:9012
0x88a30c6 output_comp_unit
        /vol/gcc/src/hg/trunk/local/gcc/dwarf2out.c:10288
0x88d1447 dwarf2out_finish
        /vol/gcc/src/hg/trunk/local/gcc/dwarf2out.c:29441

Solaris 11 and 12 are not affected for some reason.

Seen with

$ cc1plus -fpreprocessed ostream-inst.ii -quiet -m64 -g -O2 -o ostream-inst.s

#0  fancy_abort (file=0x99a2108 "/vol/gcc/src/hg/trunk/local/gcc/dwarf2out.c", 
    line=9008, 
    function=0x99a7826 <calc_die_sizes(die_struct*)::__FUNCTION__>
"calc_die_sizes") at /vol/gcc/src/hg/trunk/local/gcc/diagnostic.c:1447
#1  0x088a01bb in calc_die_sizes (die=0xfeb2e360)
    at /vol/gcc/src/hg/trunk/local/gcc/dwarf2out.c:9007
#2  0x088a0206 in calc_die_sizes (die=0xfea1d030)
    at /vol/gcc/src/hg/trunk/local/gcc/dwarf2out.c:9012
#3  0x088a30c7 in output_comp_unit (die=0xfea1d030, output_if_empty=0, 
    dwo_id=0x0) at /vol/gcc/src/hg/trunk/local/gcc/dwarf2out.c:10288
#4  0x088d1448 in dwarf2out_finish ()
    at /vol/gcc/src/hg/trunk/local/gcc/dwarf2out.c:29441
#5  0x08cdb379 in compile_file ()
    at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:546
#6  0x08cdd598 in do_compile ()
    at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:2012
#7  0x08cdd854 in toplev::main (this=0x80475ee, argc=9, argv=0x804761c)
    at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:2146
#8  0x096cb877 in main (argc=9, argv=0x804761c)
    at /vol/gcc/src/hg/trunk/local/gcc/main.c:39

(gdb) p die->die_offset
$1 = 262

  Rainer

Reply via email to