https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80158

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Bill Schmidt from comment #10)
> Pretty certain the problem is in this chunk:
> 
>       if (bump == 0)
>         {
>           tree lhs = gimple_assign_lhs (c->cand_stmt);
>           gassign *copy_stmt = gimple_build_assign (lhs, basis_name);
>           gimple_stmt_iterator gsi = gsi_for_stmt (c->cand_stmt);
>           gimple_set_location (copy_stmt, gimple_location (c->cand_stmt));
>           gsi_replace (&gsi, copy_stmt, false);
>           c->cand_stmt = copy_stmt;
>           if (dump_file && (dump_flags & TDF_DETAILS))
>             stmt_to_print = copy_stmt;
>       }
> 
> We need a gimple_set_bb (copy_stmt, gimple_bb (c->cand_stmt)) in here if
> we're going to rely on the BB information for dominators subsequently. 
> There may be other cases like this in the code.

gsi_replace does
gimple_set_bb (stmt, gsi_bb (*gsi));
so I don't see why that would be needed.

Reply via email to