This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/81744] [8 Regression] ICE: verify_ssa failed, at tree-ssa.c:1186


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to amker from comment #4)
> So with below code in prepare_finalizers_chain:
>   tree fini, niters = number_of_latch_executions (loop);
>   //...
>   niters = copy_node (niters);
>   niters = force_gimple_operand (niters, &stmts, true, NULL);
> 
> Even with copy_node, the old niters (which is loop->nb_iterations is changed
> by the call to force_gimple_operand.  The code expects every time function
> prepare_finalizers_chain is callsed, the niters/loop->nb_iterations stays in
> the same.  What should I do that?  Thanks.

copy_node copies only one level.  force_gimple_operand, like other entrypoints
to the gimplifier, are destructive on the tree you pass in, so if you want to
reuse niters after it, you should use niters = unshare_expr (niters).

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