Re: [PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-10 Thread Jason Merrill
On 04/10/2014 09:19 AM, Jakub Jelinek wrote: Thus, I've bootstrapped/regtested this version on x86_64-linux and i686-linux, is this ok to everybody for now? OK. Jason

Re: [PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-10 Thread Richard Biener
On April 10, 2014 3:19:42 PM CEST, Jakub Jelinek wrote: >On Wed, Apr 09, 2014 at 02:10:04PM -0400, Jason Merrill wrote: >> On 04/09/2014 04:21 AM, Richard Biener wrote: >> >>The names of the in-charge and not-in-charge constructor clones are >> >>complete_ctor_identifier and base_ctor_identifier (

Re: [PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-10 Thread Jakub Jelinek
On Wed, Apr 09, 2014 at 02:10:04PM -0400, Jason Merrill wrote: > On 04/09/2014 04:21 AM, Richard Biener wrote: > >>The names of the in-charge and not-in-charge constructor clones are > >>complete_ctor_identifier and base_ctor_identifier (and dtor for > >>destructors); you could check for those. > >

Re: [PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-09 Thread Jason Merrill
On 04/09/2014 04:21 AM, Richard Biener wrote: The names of the in-charge and not-in-charge constructor clones are complete_ctor_identifier and base_ctor_identifier (and dtor for destructors); you could check for those. I was more asking for how we present those To the user in diagnostics. I wan

Re: [PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-09 Thread Jakub Jelinek
On Wed, Apr 09, 2014 at 11:37:35AM +0200, Martin Jambor wrote: > I think you should use DECL_ABSTRACT_ORIGIN instead of > former_clone_of. Not only you avoid using cgraph stuff here but > unlike this patch, it also works for IPA-CP clones of IPA-SRA clones > (yeah, I know, but I bet I can cause th

Re: [PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-09 Thread Martin Jambor
Hi, On Tue, Apr 08, 2014 at 01:58:06PM +0200, Richard Biener wrote: > > This fixes PR60761 by dumping decl context of function clones > as origin with appended instead of that now > appears after we (compared to 4.8) clear DECL_LANG_SPECIFIC. > > Thus for the testcase in PR60761 we now print >

Re: [PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-09 Thread Richard Biener
On April 8, 2014 8:03:08 PM CEST, Jason Merrill wrote: >On 04/08/2014 07:58 AM, Richard Biener wrote: >> Jason, is good or shall I use sth else (do we annotate >in-charge vs. not in-charge >> constructors specially for example?). > >The names of the in-charge and not-in-charge constructor clones

Re: [PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-08 Thread Jason Merrill
On 04/08/2014 07:58 AM, Richard Biener wrote: Jason, is good or shall I use sth else (do we annotate in-charge vs. not in-charge constructors specially for example?). The names of the in-charge and not-in-charge constructor clones are complete_ctor_identifier and base_ctor_identifier (and dt

Re: [PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-08 Thread Jakub Jelinek
On Tue, Apr 08, 2014 at 01:58:06PM +0200, Richard Biener wrote: > t.ii: In function 'void foo(int) ': > t.ii:14:13: warning: iteration 3u invokes undefined behavior > [-Waggressive-loop-optimizations] > z[i] = i; > ^ Looks reasonable to me, but I'll defer this to Jason. > 2014-

[PATCH][C++] Fix PR60761, diagnostics in clones

2014-04-08 Thread Richard Biener
This fixes PR60761 by dumping decl context of function clones as origin with appended instead of that now appears after we (compared to 4.8) clear DECL_LANG_SPECIFIC. Thus for the testcase in PR60761 we now print t.ii: In function 'void foo(int) ': t.ii:14:13: warning: iteration 3u invokes und