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

--- Comment #7 from prathamesh3492 at gcc dot gnu.org ---
(In reply to Jan Hubicka from comment #5)
> The problem seems to be that cgraph_node::get_untransformed_body checks
> presence of body by DECL_RESULT which is NULL for thunks. Rest of places
> seems to check for DECL_ARGUMENTS.
Thanks for pointing out. I was wondering why this ICE'd only
with -flto-partition=none and not with other partitioning methods ? For the
test-case, with partitioning enabled, get_untransformed_body () was called only
once per node.
Or is this issue irrelevant to partitioning ?

Thanks,
Prathamesh
> 
> I am testing:
> Index: cgraph.c
> ===================================================================
> --- cgraph.c    (revision 232466)
> +++ cgraph.c    (working copy)
> @@ -3305,10 +3295,11 @@ cgraph_node::get_untransformed_body (voi
>    size_t len;
>    tree decl = this->decl;
>  
> -  if (DECL_RESULT (decl))
> +  /* Check if body is already there.  */
> +  if (!DECL_ARGUMENTS (decl))
>      return false;
>  
> -  gcc_assert (in_lto_p);
> +  gcc_assert (in_lto_p && !DECL_RESULT (decl))
>  
>    timevar_push (TV_IPA_LTO_GIMPLE_IN);

Reply via email to