Bootstrap broken at the beginning of libstdc++-v3
Jan Hubicka
jh@suse.cz
Wed Oct 22 22:58:00 GMT 2003
> > Jan Hubicka wrote:
> >
> > >2003-10-22 Jan Hubicka <jh@suse.cz>
> > > * cgraph.c (cgraph_function_possibly_inlined_p): Be conservative when
> > > global info is not ready.
> > >
> > Thanks for your quick feedback!
>
> It unforutnately just makes the failure to happen later. Not sure what
> is going on here but in case I won't be able to fix it quickly, I will
> revert the patch.
> Sorry for that!
Ahh, this is interesting.
Jason, we actually can emit DW_AT_inline with DW_AT_not_inlined for
function clones that do have abstract DIEs anyway.
Replacing abort on that path does not solve the whole problem as many of
places apparently incorrectly check abstracness of DIE by checking
value, not presence of DW_AT_inline.
I am testing the attached patch and will install it to unbreak bootstrap
if it passes. Hope that it does the right thing.
Sorry for breaking bootstrap. Obviously I bootstrapped without cleaning
the libstdc++ directory.
Honza
2003-10-22 Jan Hubicka <jh@suse.cz>
* dwarf2out.c (dwarf2out_abstract_function): Use DW_AT to check presence of DW_AT_inline.
(gen_subprogram_die): Likewise; do not abort instead of emitting DW_AT_not_inline
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v
retrieving revision 1.458
diff -c -3 -p -r1.458 dwarf2out.c
*** dwarf2out.c 22 Oct 2003 11:58:09 -0000 1.458
--- dwarf2out.c 22 Oct 2003 20:01:22 -0000
*************** dwarf2out_abstract_function (tree decl)
*** 10525,10531 ****
decl = DECL_ORIGIN (decl);
old_die = lookup_decl_die (decl);
! if (old_die && get_AT_unsigned (old_die, DW_AT_inline))
/* We've already generated the abstract instance. */
return;
--- 10525,10531 ----
decl = DECL_ORIGIN (decl);
old_die = lookup_decl_die (decl);
! if (old_die && get_AT (old_die, DW_AT_inline))
/* We've already generated the abstract instance. */
return;
*************** gen_subprogram_die (tree decl, dw_die_re
*** 10602,10608 ****
/* We can have a normal definition following an inline one in the
case of redefinition of GNU C extern inlines.
It seems reasonable to use AT_specification in this case. */
! && !get_AT_unsigned (old_die, DW_AT_inline))
{
/* ??? This can happen if there is a bug in the program, for
instance, if it has duplicate function definitions. Ideally,
--- 10602,10608 ----
/* We can have a normal definition following an inline one in the
case of redefinition of GNU C extern inlines.
It seems reasonable to use AT_specification in this case. */
! && !get_AT (old_die, DW_AT_inline))
{
/* ??? This can happen if there is a bug in the program, for
instance, if it has duplicate function definitions. Ideally,
*************** gen_subprogram_die (tree decl, dw_die_re
*** 10672,10678 ****
if (declaration)
{
! if (!old_die || !get_AT_unsigned (old_die, DW_AT_inline))
{
add_AT_flag (subr_die, DW_AT_declaration, 1);
--- 10672,10678 ----
if (declaration)
{
! if (!old_die || !get_AT (old_die, DW_AT_inline))
{
add_AT_flag (subr_die, DW_AT_declaration, 1);
*************** gen_subprogram_die (tree decl, dw_die_re
*** 10698,10711 ****
if (cgraph_function_possibly_inlined_p (decl))
add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_inlined);
else
! abort ();
}
equate_decl_number_to_die (decl, subr_die);
}
else if (!DECL_EXTERNAL (decl))
{
! if (!old_die || !get_AT_unsigned (old_die, DW_AT_inline))
equate_decl_number_to_die (decl, subr_die);
ASM_GENERATE_INTERNAL_LABEL (label_id, FUNC_BEGIN_LABEL,
--- 10698,10711 ----
if (cgraph_function_possibly_inlined_p (decl))
add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_inlined);
else
! add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_not_inlined);
}
equate_decl_number_to_die (decl, subr_die);
}
else if (!DECL_EXTERNAL (decl))
{
! if (!old_die || !get_AT (old_die, DW_AT_inline))
equate_decl_number_to_die (decl, subr_die);
ASM_GENERATE_INTERNAL_LABEL (label_id, FUNC_BEGIN_LABEL,
More information about the Gcc
mailing list