https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63595
--- Comment #7 from Pat Haugen <pthaugen at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #6)
>
> There's patch I've been testing:
>
> diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
> index d1238a4..7456fec 100644
> --- a/gcc/ipa-icf.c
> +++ b/gcc/ipa-icf.c
> @@ -869,6 +869,12 @@ sem_function::compare_phi_node (basic_block bb1,
> basic_block bb2)
> phi1 = gsi_stmt (si1);
> phi2 = gsi_stmt (si2);
>
> + tree phi_result1 = gimple_phi_result (phi1);
> + tree phi_result2 = gimple_phi_result (phi2);
> +
> + if (!m_checker->compare_operand (phi_result1, phi_result2))
> + return return_false_with_msg ("PHI results are different");
> +
> size1 = gimple_phi_num_args (phi1);
> size2 = gimple_phi_num_args (phi2);
I noticed you committed this as r216662 so gave it a try. 254.gap passes now
but 447.dealII still segfaults and has the same code as described in Comment 4.