[Bug tree-optimization/61385] [4.10 Regression] ICE on valid code at -O2 and -O3 on x86_64-linux-gnu

glisse at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 2 09:54:00 GMT 2014


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

--- Comment #3 from Marc Glisse <glisse at gcc dot gnu.org> ---
Ah, right, I use last_and_only_stmt (middle_bb) but that doesn't prove there
are no PHI nodes there. Easiest fix, something like:

if (!gimple_seq_empty_p (phi_nodes (middle_bb)))
  return 0;

A better fix would be to move the PHI nodes from middle_bb to the same block as
we are moving the assignment. I am just not completely sure how safe that is
(or how to do that, but I'll probably find examples nearby).



More information about the Gcc-bugs mailing list