Hi, this patch fixed -fprofile-use ICE where call_stmt_size is 0 while it should be non-zero. This is becuase of cgraph_merge_profiles using get_body that applies transformations and kills the profile. This is not intended to happen.
Bootstrapped/regtested x86_64-linux, will commit it shortly. * ipa-utils.c (cgraph_merge_profiles): Use get_untransformed_body. Index: ipa-utils.c =================================================================== --- ipa-utils.c (revision 219430) +++ ipa-utils.c (working copy) @@ -474,8 +474,8 @@ gcc_assert (!*slot); *slot = state; } - src->get_body (); - dst->get_body (); + src->get_untransformed_body (); + dst->get_untransformed_body (); srccfun = DECL_STRUCT_FUNCTION (src->decl); dstcfun = DECL_STRUCT_FUNCTION (dst->decl); if (n_basic_blocks_for_fn (srccfun)