------- Comment #39 from dave at hiauly1 dot hia dot nrc dot ca 2009-03-21 17:24 ------- Subject: Re: [4.4 Regression] Revision 144529 miscompiled libcpp/expr.c
> ------- Comment #38 from hjl dot tools at gmail dot com 2009-03-21 16:13 > ------- > (In reply to comment #37) > > Looking at the ICE some more, I see that the backtrace shown in the original > > report involves the code added by Honza in revision 144529. The loc value > > in frame 1 appears a somewhat wierd. > > > > I think you should try to find out which part of revision 144529 triggers > this. One thing that I know is decl_value_expr_insert is not called at all in the testcase. So, DECL_HAS_VALUE_EXPR_P (loc) being true is completely bogus. The value of loc arises from this call added in revision 144529. Breakpoint 2, decls_for_scope (stmt=0x40223dc8, context_die=0x401dbf90, depth=3) at ../../gcc/gcc/dwarf2out.c:14919 14919 process_scope_var (stmt, NULL, BLOCK_NONLOCALIZED_VAR (stmt, i), (gdb) p *(struct tree_block *)stmt $18 = {common = {base = {code = BLOCK, side_effects_flag = 0, constant_flag = 0, addressable_flag = 0, volatile_flag = 0, readonly_flag = 0, unsigned_flag = 0, asm_written_flag = 0, nowarning_flag = 0, used_flag = 0, nothrow_flag = 0, static_flag = 0, public_flag = 0, private_flag = 0, protected_flag = 0, deprecated_flag = 0, saturating_flag = 0, default_def_flag = 0, lang_flag_0 = 0, lang_flag_1 = 0, lang_flag_2 = 0, lang_flag_3 = 0, lang_flag_4 = 0, lang_flag_5 = 0, lang_flag_6 = 0, visited = 0, spare = 0, ann = 0x0}, chain = 0x0, type = 0x0}, abstract_flag = 1, block_num = 182, locus = 9123098, vars = 0x0, nonlocalized_vars = 0x40224d80, subblocks = 0x40223e00, supercontext = 0x40223d20, abstract_origin = 0x40223348, fragment_origin = 0x0, fragment_chain = 0x0} The VEC is: (gdb) x/8x 0x40224d80 0x40224d80: 0x00000002 0x00000004 0x60809ee0 0x60809e90 0x40224d90: 0xafafafaf 0xafafafaf 0xafafafaf 0xafafafaf The tree stmt is created in remap_block. At this point, I think the problem is in remap_decls since before the call we have (gdb) x/8x 0x40224d80 0x40224d80: 0x00000000 0x00000000 0x00000000 0x00000000 0x40224d90: 0x00000000 0x00000000 0x00000000 0x00000000 and after the call we have (gdb) x/8x 0x40224d80 0x40224d80: 0x00000002 0x00000004 0x60809ee0 0x60809e90 0x40224d90: 0xafafafaf 0xafafafaf 0xafafafaf 0xafafafaf (gdb) p debug_tree (0x60809ee0) <parm_decl 0x60809ee0 __y type <complex_type 0x604cab28 complex double type <real_type 0x604ca578 double sizes-gimplified asm_written type_6 DF size <integer_cst 0x60c0e900 constant 64> unit size <integer_cst 0x60c0e940 constant 8> align 64 symtab 1614619136 alias set 22 canonical type 0x604ca578 precision 64 pointer_to_this <pointer_type 0x604ca6b0> reference_to_this <reference_type 0x607156c8>> sizes-gimplified asm_written type_6 DC size <integer_cst 0x60cc44a0 constant 128> unit size <integer_cst 0x60c0eb00 constant 16> align 64 symtab 1614710336 alias set 24 canonical type 0x604cab28 pointer_to_this <pointer_type 0x604e3260>> used DC file /home/dave/gnu/gcc-4.4/objdir/hppa-linux/libstdc++-v3/include/complex line 993 col 60 size <integer_cst 0x60cc44a0 128> unit size <integer_cst 0x60c0eb00 16> align 64 context <function_decl 0x601c1f00 __complex_pow> arg-type <complex_type 0x604cab28 complex double>> $23 = void (gdb) p ((tree)0x60809ee0)->decl_common.decl_flag_3 $24 = 1 Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39355