[Bug c++/97011] ICE on C++ 20 code: gcc_assert failure in DWARF generation (tree_add_const_value_attribute, at dwarf2out.c:20283)

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Sep 11 06:28:27 GMT 2020


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-09-11

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  FE trees leak:

#1  0x0000000001038170 in tree_add_const_value_attribute (
    die=<dw_die_ref 0x7ffff6594230 DW_TAG_template_value_param
<parent=0x7ffff65940f0 DW_TAG_structure_type>>, t=<parm_decl 0x7ffff66d5580
pos>)
    at /home/rguenther/src/gcc5/gcc/dwarf2out.c:20283
20283     gcc_assert (!DECL_P (init));
(gdb) p init
$1 = <parm_decl 0x7ffff66d5580 pos>

0  fancy_abort (file=0x2a54bf8 "/home/rguenther/src/gcc5/gcc/dwarf2out.c", 
    line=20283, 
    function=0x2a60120 <tree_add_const_value_attribute(die_struct*,
tree_node*)::__FUNCTION__> "tree_add_const_value_attribute")
    at /home/rguenther/src/gcc5/gcc/diagnostic.c:1824
#1  0x0000000001038170 in tree_add_const_value_attribute (
    die=<dw_die_ref 0x7ffff6594230 DW_TAG_template_value_param
<parent=0x7ffff65940f0 DW_TAG_structure_type>>, t=<parm_decl 0x7ffff66d5580
pos>)
    at /home/rguenther/src/gcc5/gcc/dwarf2out.c:20283
#2  0x000000000104b106 in gen_remaining_tmpl_value_param_die_attribute ()
    at /home/rguenther/src/gcc5/gcc/dwarf2out.c:27130
#3  0x0000000001056378 in dwarf2out_early_finish (filename=0x3b0c930 "t.ii")
    at /home/rguenther/src/gcc5/gcc/dwarf2out.c:32076
#4  0x0000000000f7d04e in symbol_table::finalize_compilation_unit (
    this=0x7ffff656d100) at /home/rguenther/src/gcc5/gcc/cgraphunit.c:3012
#5  0x00000000016678f2 in compile_file ()
    at /home/rguenther/src/gcc5/gcc/toplev.c:482
#6  0x000000000166ab8a in do_compile ()
    at /home/rguenther/src/gcc5/gcc/toplev.c:2314
#7  0x000000000166ae83 in toplev::main (this=0x7fffffffdd7e, argc=7, 
    argv=0x7fffffffde78) at /home/rguenther/src/gcc5/gcc/toplev.c:2453
#8  0x000000000286fd02 in main (argc=7, argv=0x7fffffffde78)
    at /home/rguenther/src/gcc5/gcc/main.c:39


More information about the Gcc-bugs mailing list