This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Inlining functions with nested functions and dwarf2out


> On Tue, Sep 21, 2004 at 02:17:58AM +0200, Jan Hubicka wrote:
> > 	* dwarf2out.c (dwarf2out_finish): Deal with nested functions
> > 	of fully inlined functions.
> > 	* tree-inline.c (inline_forbidden_p_1): Nested functions can be
> > 	inlined.
> 
Actually I managed to break ada bootstrap here as pointed out on other
thread I can't find right now.  The problem is that setting parent to
NULL actually prevents function from appearing in debug info at all that
works well for C given the fact that the function must be unreachable.
However for Ada we appearently reference the function from other debug
info.
I've fixed this by seting the parent to comp_unit_decl as we do for
unnested functions and I am going to commit it as obvious to unbreak the
bootstrap.
If it looks like better alternative, I can work hader on forcing the
abstract instance of the function being constructed so the child is set
correctly.
This is not 100% trivial since I have to do pass before finaliznig the
limbo list, but definitly manageable.

bootstrapped/regtested i686-linux.

Honza

2004-09-26  Jan Hubicka  <jh@suse.cz>

	* dwafr2out.c (dwarf2out_finish): Set parent to comp_unit_die
	for nested functions whose proper parent has not been output.

Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.548
diff -c -3 -p -r1.548 dwarf2out.c
*** dwarf2out.c	23 Sep 2004 00:51:36 -0000	1.548
--- dwarf2out.c	25 Sep 2004 00:41:46 -0000
*************** dwarf2out_finish (const char *filename)
*** 13574,13579 ****
--- 13574,13581 ----
  	      origin = lookup_decl_die (context);
  	      if (origin)
  	        add_child_die (origin, die);
+ 	      else
+ 	        add_child_die (comp_unit_die, die);
  	    }
  	}
      }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]