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

Re: [PATCH][LTO] Fix EH tree corruptions


> 
> This fixes gimple verification when cc1plus and lto1 do not agree
> on whether a stmt may throw internal because of different answers
> from inlinable_call_p.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu, installed on
> the branch.
> 
> Richard.
> 
> 2009-08-25  Richard Guenther  <rguenther@suse.de>
> 
> 	* tree-eh.c (inlinable_call_p): Assume calls might be inlined
> 	when building with -flto or -fwhopr.
> 
> Index: gcc/tree-eh.c
> ===================================================================
> *** gcc/tree-eh.c	(revision 151056)
> --- gcc/tree-eh.c	(working copy)
> *************** inlinable_call_p (gimple stmt)
> *** 1995,2000 ****
> --- 1995,2003 ----
>     decl = gimple_call_fndecl (stmt);
>     if (!decl)
>       return true;
> +   /* The function body might become available during link time.  */
> +   if (flag_lto || flag_whopr)
> +     return true;

Hmm, this is bit overactive for static function in the (rare) case we
know there is static function and it is not inlinable.

>     if (cgraph_function_flags_ready
>         && cgraph_function_body_availability (cgraph_node (decl))
>         < AVAIL_OVERWRITABLE)

Perhaps it can be best handled in general by adding AVAIL_MAYBE_LATER in
between OVERWRITABLE and NOT_AVAILABLE?  I guess there are couple other
places where we want to delay decision until we know if function body
will be there or not like this.

Honza


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