This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR83157, abstract origins refering to concrete instances
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, jason at redhat dot com
- Date: Fri, 12 Jan 2018 10:15:46 +0100
- Subject: Re: [PATCH] Fix PR83157, abstract origins refering to concrete instances
- Authentication-results: sourceware.org; auth=none
- References: <alpine.LSU.2.20.1801120939250.32271@zhemvz.fhfr.qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jan 12, 2018 at 09:53:28AM +0100, Richard Biener wrote:
> This fixes PR83157 (well, not the guality fail...) and avoids creating
> references to abstract instances that actually end up refering to
> the concrete instance thereby eventually picking up invalid location
> attributes (and whatever else there may be).
>
> As said in the PR a simple testcase
>
> int foo (int i)
> {
> volatile int boring = 1;
> return boring + i;
> }
>
> int bar()
> {
> int tem = 1;
> return tem + foo (0);
> }
I'm worried that we call dwarf2out_function_decl multiple times
for the same instance of the function and that undoing it means
we won't find the DIEs we've created before and we'll create them once
again. Isn't that the case of e.g. non-LTO early vs. late dwarf?
Jakub