This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa]: Insertion at beginning of bb broken


It no longer updates the bb head properly if you insert *before* the first statement of a bb.

This is because it does:
3556		same_tsi = inserted_tsi;
3557      tsi_next (&same_tsi);
3558
3559      if (curr_container == curr_bb->head_tree_p)
3560        {
3561          curr_bb->head_tree_p = tsi_container (same_tsi);

the structure after insertion, at line 3556, is like so:

<compound_expr 0x190d940 <<<<<<<<<<<< NEW THING
type <void_type 0x15477e0 void VOID
align 8 symtab 0 alias set 21
pointer_to_this <pointer_type 0x1547850>>
side-effects
arg 0 <modify_expr 0x190d900
type <integer_type 0x1540540 long unsigned int unsigned SI
size <integer_cst 0x153d578 constant 32>
unit size <integer_cst 0x153d63c constant 4>
align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0x153d738 0> max <integer_cst 0x153d754 4294967295>>
side-effects
arg 0 <ssa_name 0x190d920 type <integer_type 0x1540540 long unsigned int>
>
arg 1 <minus_expr 0x190d8e0 type <integer_type 0x1540540 long unsigned int>


arg 0 <ssa_name 0x1901040 type <integer_type 0x158f4d0 size_t>
>
arg 1 <integer_cst 0x191b86c constant 1>>>
arg 1 <compound_expr 0x18dc5e0 type <void_type 0x15477e0 void> <<<<<<<<<< OLD THING
side-effects
arg 0 <modify_expr 0x18dc600 type <integer_type 0x1540540 long unsigned int>
side-effects
arg 0 <ssa_name 0x1904a00 type <integer_type 0x1540540 long unsigned int>
> arg 1 <ssa_name 0x190d920>
../../gcc/unwind-dw2-fde.c:548>


inserted_tsi is a pointer to NEW THING.
tsi_nexting moves it to OLD THING
tsi_container (OLD THING) == OLD THING
So we set the head to old thing, which is what it was already.
This used to work right, and set the head to the new thing
Can you please fix it?
--Dan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]