This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix C merge_decls, fallout from removal of -fno-unit-at-a-time (PR debug/37020)
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jakub Jelinek" <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Oct 2008 13:53:06 +0200
- Subject: Re: [PATCH] Fix C merge_decls, fallout from removal of -fno-unit-at-a-time (PR debug/37020)
- References: <20081020114450.GS30239@tyan-ft48-01.lab.bos.redhat.com>
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
>