[PATCH] Fix ICF with error/warning attribute (PR ipa/84628, take 3)

2018-03-02 Thread Jakub Jelinek
Hi! On Fri, Mar 02, 2018 at 10:54:36AM +0100, Jakub Jelinek wrote: > On Fri, Mar 02, 2018 at 09:31:16AM +0100, Richard Biener wrote: > > On Fri, 2 Mar 2018, Jakub Jelinek wrote: > > > > > On Fri, Mar 02, 2018 at 09:15:07AM +0100, Richard Biener wrote: > > > > You probably need a virtual return th

Re: [PATCH] Fix ICF with error/warning attribute (PR ipa/84628, take 3)

2018-03-02 Thread Richard Biener
On Fri, 2 Mar 2018, Jakub Jelinek wrote: > Hi! > > On Fri, Mar 02, 2018 at 10:54:36AM +0100, Jakub Jelinek wrote: > > On Fri, Mar 02, 2018 at 09:31:16AM +0100, Richard Biener wrote: > > > On Fri, 2 Mar 2018, Jakub Jelinek wrote: > > > > > > > On Fri, Mar 02, 2018 at 09:15:07AM +0100, Richard Bie

Re: [PATCH] Fix ICF with error/warning attribute (PR ipa/84628)

2018-03-02 Thread Jakub Jelinek
On Fri, Mar 02, 2018 at 09:31:16AM +0100, Richard Biener wrote: > On Fri, 2 Mar 2018, Jakub Jelinek wrote: > > > On Fri, Mar 02, 2018 at 09:15:07AM +0100, Richard Biener wrote: > > > You probably need a virtual return thunk as otherwise we expand them > > > directly to asm? > > > > I was trying x

Re: [PATCH] Fix ICF with error/warning attribute (PR ipa/84628)

2018-03-02 Thread Jakub Jelinek
On Fri, Mar 02, 2018 at 08:58:34AM +0100, Richard Biener wrote: > On Fri, 2 Mar 2018, Jakub Jelinek wrote: > > > Hi! > > > > If we need to use thunks for ICF to functions with warning or error > > attribute, their expansion will warn or error. This patch just punts > > in those cases instead. >

Re: [PATCH] Fix ICF with error/warning attribute (PR ipa/84628)

2018-03-02 Thread Richard Biener
On Fri, 2 Mar 2018, Jakub Jelinek wrote: > On Fri, Mar 02, 2018 at 09:15:07AM +0100, Richard Biener wrote: > > You probably need a virtual return thunk as otherwise we expand them > > directly to asm? > > I was trying x86_64 -m32 -fpic regparm (3) method with thunks so that > the asm isn't emitte

Re: [PATCH] Fix ICF with error/warning attribute (PR ipa/84628)

2018-03-02 Thread Jakub Jelinek
On Fri, Mar 02, 2018 at 09:15:07AM +0100, Richard Biener wrote: > You probably need a virtual return thunk as otherwise we expand them > directly to asm? I was trying x86_64 -m32 -fpic regparm (3) method with thunks so that the asm isn't emitted. But the thunk was still using call to .LTHUNKN rat

Re: [PATCH] Fix ICF with error/warning attribute (PR ipa/84628)

2018-03-02 Thread Richard Biener
On Fri, 2 Mar 2018, Jakub Jelinek wrote: > On Fri, Mar 02, 2018 at 08:58:34AM +0100, Richard Biener wrote: > > On Fri, 2 Mar 2018, Jakub Jelinek wrote: > > > > > Hi! > > > > > > If we need to use thunks for ICF to functions with warning or error > > > attribute, their expansion will warn or erro

Re: [PATCH] Fix ICF with error/warning attribute (PR ipa/84628)

2018-03-01 Thread Richard Biener
On Fri, 2 Mar 2018, Jakub Jelinek wrote: > Hi! > > If we need to use thunks for ICF to functions with warning or error > attribute, their expansion will warn or error. This patch just punts > in those cases instead. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Looks

[PATCH] Fix ICF with error/warning attribute (PR ipa/84628)

2018-03-01 Thread Jakub Jelinek
Hi! If we need to use thunks for ICF to functions with warning or error attribute, their expansion will warn or error. This patch just punts in those cases instead. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-03-02 Jakub Jelinek PR ipa/84628 * i