Re: [RFC] Fix for PR58201

2013-09-07 Thread Jan Hubicka
> > Hi all, Jakub, > > > > On 09/07/2013 01:16 PM, Jakub Jelinek wrote: > > >As I wrote in the PR, IMHO mangle_decl should > > > location_t save_location = input_location; > > > input_location = DECL_SOURCE_LOCATION (decl); > > >... > > > input_location = save_location; > > >around the call,

Re: [RFC] Fix for PR58201

2013-09-07 Thread Jan Hubicka
> Hi all, Jakub, > > On 09/07/2013 01:16 PM, Jakub Jelinek wrote: > >As I wrote in the PR, IMHO mangle_decl should > > location_t save_location = input_location; > > input_location = DECL_SOURCE_LOCATION (decl); > >... > > input_location = save_location; > >around the call, > I had a look an

Re: [RFC] Fix for PR58201

2013-09-07 Thread Paolo Carlini
Hi all, Jakub, On 09/07/2013 01:16 PM, Jakub Jelinek wrote: As I wrote in the PR, IMHO mangle_decl should location_t save_location = input_location; input_location = DECL_SOURCE_LOCATION (decl); ... input_location = save_location; around the call, I had a look and I'm afraid this is alr

Re: [RFC] Fix for PR58201

2013-09-07 Thread Jason Merrill
On 09/07/2013 06:13 AM, Paolo Carlini wrote: Actually this kind of change makes a lot of sense to me (cmp clang too): since at that point we do *not* really know the location of the "required from" bit, just plainly admit it. Would it be possible in such cases to have a conditional in the diagn

Re: [RFC] Fix for PR58201

2013-09-07 Thread Jakub Jelinek
On Sat, Sep 07, 2013 at 11:00:22AM +0200, Paolo Carlini wrote: > and thanks for the analysis, now I understand the issue a little more. > > On 09/07/2013 10:28 AM, Jan Hubicka wrote: > >So it is just an accident that the line info is output sanely (if > >line 9 is sane, I don't exactly know) > I w

Re: [RFC] Fix for PR58201

2013-09-07 Thread Paolo Carlini
Hi >What I can think of is to hide the stale source location when it no >longer have >defined meaning: >Index: cgraphunit.c >=== >--- cgraphunit.c(revision 202352) >+++ cgraphunit.c(working copy) >@@ -913,6 +913,7 @@

Re: [RFC] Fix for PR58201

2013-09-07 Thread Jan Hubicka
> Hi Honza, > > and thanks for the analysis, now I understand the issue a little more. > > On 09/07/2013 10:28 AM, Jan Hubicka wrote: > >So it is just an accident that the line info is output sanely (if > >line 9 is sane, I don't exactly know) > I would say that in general it's definitely sane, b

Re: [RFC] Fix for PR58201

2013-09-07 Thread Paolo Carlini
Hi Honza, and thanks for the analysis, now I understand the issue a little more. On 09/07/2013 10:28 AM, Jan Hubicka wrote: So it is just an accident that the line info is output sanely (if line 9 is sane, I don't exactly know) I would say that in general it's definitely sane, because that is t

Re: [RFC] Fix for PR58201

2013-09-07 Thread Jan Hubicka
> > >+ 2013-09-04 Jan Hubicka > > >+ > > >+ PR middle-end/58201 > > >+ * cgraphunit.c (analyze_functions): Clear AUX fields > > >+ after processing; initialize assembler name has. > > >+ > > I checked and double checked and with this commit a C++ test regressed: > > > > FAIL: g++.dg/template

Re: [RFC] Fix for PR58201

2013-09-07 Thread Jan Hubicka
> >+ 2013-09-04 Jan Hubicka > >+ > >+PR middle-end/58201 > >+* cgraphunit.c (analyze_functions): Clear AUX fields > >+after processing; initialize assembler name has. > >+ > I checked and double checked and with this commit a C++ test regressed: > > FAIL: g++.dg/template/cond2.C -st

Re: [RFC] Fix for PR58201

2013-09-06 Thread Paolo Carlini
Hi Honza, On 09/06/2013 01:05 AM, Jan Hubicka wrote: Hi, this is the patch I commited after testing on x86_64-linux. Honza Index: ChangeLog === *** ChangeLog (revision 202271) --- ChangeLog (working copy) *** *** 1

Re: [RFC] Fix for PR58201

2013-09-05 Thread Jan Hubicka
Hi, this is the patch I commited after testing on x86_64-linux. Honza Index: ChangeLog === *** ChangeLog (revision 202271) --- ChangeLog (working copy) *** *** 1,3 --- 1,9 + 2013-09-04 Jan Hubicka + +

Re: [RFC] Fix for PR58201

2013-09-05 Thread Jan Hubicka
> On 09/04/2013 10:49 AM, Bernd Schmidt wrote: > >On 09/04/2013 06:04 PM, Jan Hubicka wrote: > >>this is third fallout of my change to remove DECL_ARGUMENTS/DECL_RESULT for > >>functions w/o > >>bodies I did not really anticipate. > >[...] > >>I would like to basically ask if it seems to make sens

Re: [RFC] Fix for PR58201

2013-09-04 Thread Richard Biener
Jan Hubicka wrote: >> On 09/04/2013 06:04 PM, Jan Hubicka wrote: >> > this is third fallout of my change to remove >DECL_ARGUMENTS/DECL_RESULT for functions w/o >> > bodies I did not really anticipate. >> [...] >> > I would like to basically ask if it seems to make sense to go this >route and >> >

Re: [RFC] Fix for PR58201

2013-09-04 Thread Jeff Law
On 09/04/2013 10:49 AM, Bernd Schmidt wrote: On 09/04/2013 06:04 PM, Jan Hubicka wrote: this is third fallout of my change to remove DECL_ARGUMENTS/DECL_RESULT for functions w/o bodies I did not really anticipate. [...] I would like to basically ask if it seems to make sense to go this route

Re: [RFC] Fix for PR58201

2013-09-04 Thread Bernd Schmidt
On 09/04/2013 07:09 PM, Jan Hubicka wrote: > How do you support K&R functions here? My basic idea was that TYPE_ARG_TYPES > should give enough information about external function calling convention > anyone will ever need. I would hope that this will be sufficient for your > use, too, despite the

Re: [RFC] Fix for PR58201

2013-09-04 Thread Jan Hubicka
> On 09/04/2013 06:04 PM, Jan Hubicka wrote: > > this is third fallout of my change to remove DECL_ARGUMENTS/DECL_RESULT for > > functions w/o > > bodies I did not really anticipate. > [...] > > I would like to basically ask if it seems to make sense to go this route and > > try to get rid of thos

Re: [RFC] Fix for PR58201

2013-09-04 Thread Bernd Schmidt
On 09/04/2013 06:04 PM, Jan Hubicka wrote: > this is third fallout of my change to remove DECL_ARGUMENTS/DECL_RESULT for > functions w/o > bodies I did not really anticipate. [...] > I would like to basically ask if it seems to make sense to go this route and > try to get rid of those declarations

Re: [RFC] Fix for PR58201

2013-09-04 Thread Jakub Jelinek
On Wed, Sep 04, 2013 at 06:04:09PM +0200, Jan Hubicka wrote: > * cgraphunit.c (analyze_functions): Populate assembler names once done > with early unreachable function removal. Please add some of the testcases from the PRs and mention the PRs in the ChangeLog entry. > --- cgraphunit.c