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] Fix C merge_decls, fallout from removal of -fno-unit-at-a-time (PR debug/37020)


On Mon, Oct 20, 2008 at 1:44 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> Hi!
>
> This used to be:
>          if (TREE_USED (olddecl)
>              /* In unit-at-a-time mode we never inline re-defined extern
>                 inline functions.  */
>              && !flag_unit_at_a_time
>              && cgraph_function_possibly_inlined_p (olddecl))
>            (*debug_hooks->outlining_inline_function) (olddecl);
> before removal of -fno-unit-at-a-time, but the commit that removed
> it didn't replace !flag_unit_at_a_time with 0 (i.e. remove the whole
> conditional), but 1 (i.e. just removed && !flag_unit_at_a_time).
> With unit-at-a-time inlining, we know nothing has been inlined yet,
> so there is no point to call outlining_inline_function; we know
> it won't be inlined later on either, as we set DECL_UNINLINABLE on it.
>
> Ok for trunk?

Ok if bootstrapped and tested.

thanks,
Richard.

> 2008-10-20  Jakub Jelinek  <jakub@redhat.com>
>
>        PR debug/37020
>        * c-decl.c (merge_decls): Don't call outlining_inline_function hook.
>
> --- gcc/c-decl.c.jj     2008-10-20 12:36:10.000000000 +0200
> +++ gcc/c-decl.c        2008-10-20 13:05:18.000000000 +0200
> @@ -1775,17 +1775,8 @@ merge_decls (tree newdecl, tree olddecl,
>         throw it away, in case it was inlined into a function that
>         hasn't been written out yet.  */
>       if (new_is_definition && DECL_INITIAL (olddecl))
> -       {
> -         if (TREE_USED (olddecl)
> -             /* We never inline re-defined extern inline functions.
> -                FIXME: This would be better handled by keeping both functions
> -                as separate declarations.  */
> -             && cgraph_function_possibly_inlined_p (olddecl))
> -           (*debug_hooks->outlining_inline_function) (olddecl);
> -
> -         /* The new defn must not be inline.  */
> -         DECL_UNINLINABLE (newdecl) = 1;
> -       }
> +       /* The new defn must not be inline.  */
> +       DECL_UNINLINABLE (newdecl) = 1;
>       else
>        {
>          /* If either decl says `inline', this fn is inline, unless
>
>        Jakub
>


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