duplicate_block weirdness
Sean Callanan
spyffe@cs.sunysb.edu
Tue Apr 11 20:19:00 GMT 2006
Yes, I meant
--
>> basic_block my_basic_block;
>> basic_block dup_basic_block;
>>
>> FOR_EACH_BB(my_basic_block)
>> {
>> dup_basic_block = duplicate_block(my_basic_block, NULL);
>> }
--
I also got some more precise context. The statement being copied at
that point is:
--
*D.1600 = 0;
--
whose GIMPLE representation looks like this:
--
MODIFY_EXPR (2)
INDIRECT_REF (1)
VAR_DECL(0)
INTEGER_CST(0)
--
where the number in parentheses is the number of operands. The
backtrace below:
--
>> #0 0x0000000100175688 in get_indirect_ref_operands
>> (stmt=0xffffffff7ea0c640, expr=0xffffffff7eaf8100, flags=0)
>> at ../../gcc-4.0.1/gcc/tree-ssa-operands.c:1417
>> #1 0x0000000100173dcc in get_expr_operands
>> (stmt=0xffffffff7ea0c640, expr_p=0xffffffff7ea0c3f8, flags=0)
>> at ../../gcc-4.0.1/gcc/tree-ssa-operands.c:1091
>> #2 0x000000010017406c in get_expr_operands
>> (stmt=0xffffffff7ea0c640, expr_p=0xffffffff7ea0c680, flags=0)
>> at ../../gcc-4.0.1/gcc/tree-ssa-operands.c:1134
>> #3 0x0000000100172f94 in build_ssa_operands
>> (stmt=0xffffffff7ea0c640, ann=0xffffffff7eaf6850,
>> old_ops=0xffffffff7fffcd90, new_ops=0xffffffff7eaf6878)
>> at ../../gcc-4.0.1/gcc/tree-ssa-operands.c:906
>> #4 0x0000000100173b20 in get_stmt_operands (stmt=0xffffffff7ea0c640)
>> at ../../gcc-4.0.1/gcc/tree-ssa-operands.c:1021
>> #5 0x000000010010ca18 in tree_duplicate_bb (bb=0xffffffff7eafbe10)
>> at ../../gcc-4.0.1/gcc/tree-cfg.c:4684
>> #6 0x0000000100591ea8 in duplicate_block (bb=0xffffffff7eafbe10,
>> e=0x0)
>> at ../../gcc-4.0.1/gcc/cfghooks.c:717
>> ...
--
is from an ICE:
- get_expr_operands() on the INDIRECT_REF calls
get_indirect_ref_operands(), and
- get_indirect_ref_operands() tries to look at the var_ann for the
INDIRECT_REF, which is NULL at that point.
Is the var_ann NULL because I need to require something more than
PROP_gimple_any | PROP_ssa | PROP_cfg | PROP_referenced_vars, or is
there something else going on here?
Sincerely,
Sean Callanan
More information about the Gcc
mailing list