This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR59626, _FORTIFY_SOURCE wrappers and LTO
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Ryan Hill <rhill at gentoo dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 8 Apr 2014 10:31:48 +0200
- Subject: Re: [PATCH] Fix PR59626, _FORTIFY_SOURCE wrappers and LTO
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1403241048220 dot 26135 at zhemvz dot fhfr dot qr> <20140404061826 dot GC16291 at kam dot mff dot cuni dot cz> <20140408001247 dot 627546f1 at caribou dot gateway dot pace dot com>
On Tue, Apr 8, 2014 at 8:12 AM, Ryan Hill <rhill@gentoo.org> wrote:
> On Fri, 4 Apr 2014 08:18:26 +0200
> Jan Hubicka <hubicka@ucw.cz> wrote:
>
>> Hi,
>> here is an updated version of my earlier ipa.c change. It turns out that the
>> problem was that I did not drop always_inline.
>> In this version I just drop always_inline attribute on all functions whose
>> body is removed. The patch will affect non-LTO compilation, too, but IMO
>> only by making us to not inline&diagnose the cases where indirect call to
>> always inline is turned direct in between early opts and inline. Does that
>> seem acceptable? (I personally would preffer this over inventing yet another
>> way to special case always_inline for LTO only; we never made any strong
>> promises on always_inline and indirect calls)
>>
>> Honza
>>
>> * lto-cgraph.c (input_overwrite_node): Check that partitioning
>> flags are set only during streaming.
>> * ipa.c (process_references, walk_polymorphic_call_targets,
>> symtab_remove_unreachable_nodes): Drop bodies of always inline
>> after early inlining.
>> (symtab_remove_unreachable_nodes): Remove always_inline attribute.
>>
>> * gcc.dg/lto/pr59626_0.c: New testcase.
>> * gcc.dg/lto/pr59626_1.c: New testcase.
>
> Would it be possible to backport this to 4.8? It fixes a number of issues
> we're seeing, including a couple unrelated to LTO (eg. PR50506).
Let it have some burn-in on 4.9 please. It may cause unexpected behavior
for people relying on always-inlining through indirect function calls.
Richard.
>
> --
> Ryan Hill psn: dirtyepic_sk
> gcc-porting/toolchain/wxwidgets @ gentoo.org
>
> 47C3 6D62 4864 0E49 8E9E 7F92 ED38 BD49 957A 8463