[Bug c/34601] [4.3 regression] ICE with undefined enum

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Jan 13 15:23:00 GMT 2008



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-01-13 15:11 -------
Confirmed.  We leak

(gdb) call debug_tree (t)
 <var_decl 0xb7cb2108 e type <error_mark 0xb7ca83f0>
    used unsigned SI file t.i line 3 col 10
    align 32 context <function_decl 0xb7d129a0 foo>
    (reg:SI 58)>

to

#2  0x08218782 in set_reg_attrs_for_decl_rtl (t=0xb7cb2108, x=0xb7caee60)
    at /home/richard/src/trunk/gcc/emit-rtl.c:1009
1006      if (REG_P (x))
1007        REG_ATTRS (x)
1008          = get_reg_attrs (t, byte_lowpart_offset (GET_MODE (x),
1009                                                   TYPE_MODE (TREE_TYPE
(t))));

because we end up expanding stuff even though errorcount is 1.  Supposedly
we need to do this, but the special routine expand_one_error_var should
be more careful here.

#1  0x0872766d in tree_class_check_failed (node=0xb7ccb3f0, cl=tcc_type, 
    file=0x8a7d4d4 "/home/richard/src/trunk/gcc/emit-rtl.c", line=1009, 
    function=0x8a7d560 "set_reg_attrs_for_decl_rtl")
    at /home/richard/src/trunk/gcc/tree.c:6863
#2  0x08218782 in set_reg_attrs_for_decl_rtl (t=0xb7cd5108, x=0xb7cd1e60)
    at /home/richard/src/trunk/gcc/emit-rtl.c:1009
#3  0x08218978 in set_decl_rtl (t=0xb7cd5108, x=0xb7cd1e60)
    at /home/richard/src/trunk/gcc/emit-rtl.c:1045
#4  0x089692bc in expand_one_error_var (var=0xb7cd5108)
    at /home/richard/src/trunk/gcc/cfgexpand.c:702


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to work|                            |4.2.3
   Last reconfirmed|0000-00-00 00:00:00         |2008-01-13 15:11:41
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34601



More information about the Gcc-bugs mailing list