This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[RFC] PR 12389
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Sun, 19 Oct 2003 03:46:16 +0200
- Subject: [RFC] PR 12389
Hi,
PR 12389 has testcase that dies in dwarf2out because we inline function
that is not DECL_INLINE because it is called once in unit-at-a-time.
I am not quite sure how to deal with this. Accepting current scheme, we
probably should mark all functions DECL_INLINE but I don't see anything
good in it.
Why do we need knowing whether function is inlined in dwarf2out at first
place? In the case it is just optimization of dwarf output, perhaps I
shall make dwarf2out to check out whether some of call edges has inline
flag? Or is the patch bellow to imply DECL_INLINE for dwarf2out fine?
Honza
Sun Oct 19 03:41:26 CEST 2003 Jan Hubicka <jh@suse.cz>
* dwarf2out.c (gen_subprogram_die, gen_decl_die): All functions are inline
in unit-at-a-time
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.457
diff -c -3 -p -r1.457 dwarf2out.c
*** dwarf2out.c 6 Oct 2003 22:25:15 -0000 1.457
--- dwarf2out.c 19 Oct 2003 01:41:16 -0000
*************** gen_subprogram_die (tree decl, dw_die_re
*** 10685,10691 ****
}
else if (DECL_ABSTRACT (decl))
{
! if (DECL_INLINE (decl) && !flag_no_inline)
{
/* ??? Checking DECL_DEFER_OUTPUT is correct for static
inline functions, but not for extern inline functions.
--- 10685,10691 ----
}
else if (DECL_ABSTRACT (decl))
{
! if ((DECL_INLINE (decl) || flag_unit_at_a_time) && !flag_no_inline)
{
/* ??? Checking DECL_DEFER_OUTPUT is correct for static
inline functions, but not for extern inline functions.
*************** gen_decl_die (tree decl, dw_die_ref cont
*** 11800,11806 ****
/* If we're emitting an out-of-line copy of an inline function,
emit info for the abstract instance and set up to refer to it. */
! else if (DECL_INLINE (decl) && ! DECL_ABSTRACT (decl)
&& ! class_scope_p (context_die)
/* dwarf2out_abstract_function won't emit a die if this is just
a declaration. We must avoid setting DECL_ABSTRACT_ORIGIN in
--- 11800,11806 ----
/* If we're emitting an out-of-line copy of an inline function,
emit info for the abstract instance and set up to refer to it. */
! else if ((DECL_INLINE (decl) || flag_unit_at_a_time) && ! DECL_ABSTRACT (decl)
&& ! class_scope_p (context_die)
/* dwarf2out_abstract_function won't emit a die if this is just
a declaration. We must avoid setting DECL_ABSTRACT_ORIGIN in