[Bug c/43211] [4.5 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at tree-ssa.c:1430

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Mar 1 10:48:00 GMT 2010



------- Comment #2 from rguenth at gcc dot gnu dot org  2010-03-01 10:48 -------
Confirmed.  We leak bogus function types to the middle-end:

(gdb) call debug_tree (inner_type)
 <function_type 0x7ffff5ade738
    type <void_type 0x7ffff7ee4e70 void VOID
        align 8 symtab 0 alias set -1 canonical type 0x7ffff7ee4e70
        pointer_to_this <pointer_type 0x7ffff7ee4f18>>
    QI
    size <integer_cst 0x7ffff7ed2730 type <integer_type 0x7ffff7ee40a8
bit_size_type> constant 8>
    unit size <integer_cst 0x7ffff7ed2758 type <integer_type 0x7ffff7ee4000
long unsigned int> constant 1>
    align 8 symtab 0 alias set -1 structural equality
    arg-types <tree_list 0x7ffff7fcf898 value <error_mark 0x7ffff7edab70>
        chain <tree_list 0x7ffff7ef70f0 value <void_type 0x7ffff7ee4e70 void>>>
    pointer_to_this <pointer_type 0x7ffff5ade930>>

which is void ()(<error-mark-node>)

useless_type_converison_p doesn't expect this.  Called from

#7  0x0000000000800e6d in gimplify_modify_expr (expr_p=0x7ffff5afa0b0, 
    pre_p=0x7fffffffced8, post_p=0x7fffffffc558, want_value=0 '\000')
    at /space/rguenther/src/svn/trunk/gcc/gimplify.c:4409
4409          STRIP_USELESS_TYPE_CONVERSION (*from_p);

A radical approach would be to not gimplify in case of errors (now that
most diagnostics we'd want to preserve have been moved pre-gimplification).


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-03-01 10:48:27
               date|                            |
   Target Milestone|---                         |4.5.0


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



More information about the Gcc-bugs mailing list