This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to dwarf inline handling
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: Patch to dwarf inline handling
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Mon, 8 May 2000 10:20:06 +0200
- Cc: gcc-patches at gcc dot gnu dot org
- References: <200004260034.RAA14737@casey.cygnus.com>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Tue, Apr 25, 2000 at 05:34:58PM -0700, Jason Merrill wrote:
> The functions-as-trees changes in the C++ frontend have broken the old
> invariant that the out-of-line copy of an inline function (if any)
> would be emitted from output_inline_function, so set_decl_origin_self
> wasn't being called. This patch moves that call into the dwarf
> backends, improving modularity. It also limits the division of the
> debug info into abstract and concrete instances to actual inlines;
> previously we also did this for normal functions that weren't being
> emitted immediately for whatever reason.
This patch breaks inlined nested functions, at least on
i386-redhat-linux and sparc64-redhat-linux.
A simple test case can be e.g.:
int
foo (const char *response)
{
inline int try (int match)
{
return match;
}
return (try (1) ?: try (0));
}
with -gdwarf-2 -O2 (taken from glibc).
The only abort() in dwarf2out_finish is triggered.
This is with current CVS.
> 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
>
> * dwarf2out.c (add_bound_info): Don't crash on an unexpanded SAVE_EXPR.
>
> * dwarfout.c (output_decl): Ignore NAMESPACE_DECLs.
>
> * dwarf2out.c (gen_subprogram_die): The class-scope declaration DIE
> is the primary DIE for a member function.
> (gen_decl_die): Call set_decl_origin_self here.
> * dwarfout.c (output_decl): And here.
> * integrate.c (output_inline_function): Not here.
> Don't clear DECL_INLINE until after calling rest_of_compilation.
> (set_decl_origin_self): No longer static.
> * tree.h: Add prototype.
> * toplev.c (note_deferral_of_defined_inline_function): Only write
> out abstract instance for actual inlines.
Jakub