From 8d8238b6267048f1238ea5e6212fdb922b284954 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Wed, 10 May 2000 11:02:37 +0000 Subject: [PATCH] dwarf2out.c (gen_subprogram_die): Fixup die_parent for the abstract instance of a nested inline function. * dwarf2out.c (gen_subprogram_die): Fixup die_parent for the abstract instance of a nested inline function. * stor-layout.c (finish_record_layout): finalize_type_size before laying out the pending_statics. From-SVN: r33820 --- gcc/ChangeLog | 8 ++++++++ gcc/dwarf2out.c | 5 +++++ gcc/stor-layout.c | 6 +++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 67b2bfc1dea..2c46eac8b0a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2000-05-10 Jason Merrill + + * dwarf2out.c (gen_subprogram_die): Fixup die_parent for the + abstract instance of a nested inline function. + + * stor-layout.c (finish_record_layout): finalize_type_size + before laying out the pending_statics. + Wed 10 May 09:36:47 2000 Neil Booth * cpplex.c (spell_token): New function. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 2e1b689496a..c0da4221632 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -8160,6 +8160,11 @@ gen_subprogram_die (decl, context_die) if (declaration && ! local_scope_p (context_die)) abort (); + /* Fixup die_parent for the abstract instance of a nested + inline function. */ + if (old_die && old_die->die_parent == NULL) + add_child_die (context_die, old_die); + subr_die = new_die (DW_TAG_subprogram, context_die); add_abstract_origin_attribute (subr_die, origin); } diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index eadb9732a8f..ad7768f1487 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -1162,6 +1162,9 @@ finish_record_layout (rli) /* Compute the TYPE_MODE for the record. */ compute_record_mode (rli->t); + /* Perform any last tweaks to the TYPE_SIZE, etc. */ + finalize_type_size (rli->t); + /* Lay out any static members. This is done now because their type may use the record's type. */ while (rli->pending_statics) @@ -1170,9 +1173,6 @@ finish_record_layout (rli) rli->pending_statics = TREE_CHAIN (rli->pending_statics); } - /* Perform any last tweaks to the TYPE_SIZE, etc. */ - finalize_type_size (rli->t); - /* Clean up. */ free (rli); }