This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix DECL_ABSTRACT_P/BLOCK_ABSTRACT handling in dwarf2out.c (PR middle-end/64937)
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Jason Merrill <jason at redhat dot com>, Cary Coutant <ccoutant at google dot com>, Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 06 Feb 2015 08:56:11 -0800
- Subject: Re: [PATCH] Fix DECL_ABSTRACT_P/BLOCK_ABSTRACT handling in dwarf2out.c (PR middle-end/64937)
- Authentication-results: sourceware.org; auth=none
- References: <20150205154250 dot GI1746 at tucnak dot redhat dot com> <276831C0-FC48-484D-A844-88F4C3135ACC at gmail dot com>
- Reply-to: aldyh at redhat dot com
Richard Biener <richard.guenther@gmail.com> writes:
> Looks good to me. I wonder if this will also help Aldyh...
Hmmm, I ran into something very similar. We solved it on the
debug-early branch by avoiding recursively setting DECL_ABSTRACT_P if
the parent was *not* DECL_ABSTRACT_P. Like this:
@@ -18274,7 +18312,8 @@ dwarf2out_abstract_function (tree decl)
current_function_decl = decl;
was_abstract = DECL_ABSTRACT_P (decl);
- set_decl_abstract_flags (decl, 1);
+ if (!was_abstract)
+ set_decl_abstract_flags (decl, 1);
dwarf2out_decl (decl);
if (! was_abstract)
Does this help, or do you need to keep track of everything you changed?
I'll say it again, I think setting tree flags behind everyone's back as
we call dwarf2out_decl() _again_ seems like a broken design. But I
think Jason mentioned that creating new tree instances for the different
variants was a no-go. Anyways...
Aldy