This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Fix for PR58201
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Jan Hubicka <hubicka at ucw dot cz>, Richard Biener <rguenther at suse dot de>, Bernd Schmidt <bernds at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, jason at redhat dot com
- Date: Sat, 7 Sep 2013 23:33:41 +0200
- Subject: Re: [RFC] Fix for PR58201
- Authentication-results: sourceware.org; auth=none
- References: <52276493 dot 9070706 at codesourcery dot com> <20130904170918 dot GI20687 at kam dot mff dot cuni dot cz> <c1c2f51e-89b8-4632-a075-3f82464e973c at email dot android dot com> <20130905230516 dot GB14285 at kam dot mff dot cuni dot cz> <5229FC71 dot 2090709 at oracle dot com> <20130907080308 dot GA8074 at kam dot mff dot cuni dot cz> <20130907082846 dot GC4841 at kam dot mff dot cuni dot cz> <522AEB26 dot 5060701 at oracle dot com> <20130907111603 dot GV23437 at tucnak dot redhat dot com> <522B8778 dot 4020408 at oracle dot com>
> 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 already happening and isn't
> enough: in mangle_decl_string, the call of write_mangled_name is
> wrapped in exactly what you are suggesting. Or you mean something
> else?
>
> Otherwise, I'm afraid we have to resort to what Jason too appears to
> find acceptable, thus what Honza proposed about UNKNOWN_LOCATION +
> the tweak to print_instantiation_partial_context_line (essentially
> just return immediately if loc == UNKNOWN_LOCATION, I think)
Yes, I think those two changes makes perfect case. Middle end probably should
be more consistent about not setting input_locations beyhond of this point (it
does not really make much sense). It is not how things works unforutnately -
RTL expansion still lives in statement at a time and uses input location to
propagate things down and there are many other random setters of this variable.
I will try to audit things incrementally. With the change to cgraphunit I made
this week all mangling ought to happen early (this is also not 100% true: in
some very special cases where we late access virtual tables through BINFOs, I
have independent fix for that).
Honza
>
> Paolo.