From fd7876407c7ff2ca489861538b886393a95efa8d Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 29 Feb 2012 18:28:41 +0000 Subject: dwarf2out.c (modified_type_die): Set DW_AT_GNAT_descriptive_type and DW_AT_artificial attributes at the end of... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dwarf2out.c (modified_type_die): Set DW_AT_GNAT_descriptive_type and DW_AT_artificial attributes at the end of the processing. (gen_array_type_die): Likewise. (gen_enumeration_type_die): Likewise. (gen_struct_or_union_type_die): Likewise. (add_gnat_descriptive_type_attribute): Do not suppress debug info for the parent type. ada/ * gcc-interface/decl.c (components_to_record): Add ARTIFICIAL parameter and set TYPE_ARTIFICIAL according to it.  Adjust recursive call. (gnat_to_gnu_entity) : Adjust call to above function. * gcc-interface/utils.c (rest_of_record_type_compilation): Do not invoke rest_of_type_decl_compilation on the parallel type, if any. From-SVN: r184667 --- gcc/ada/gcc-interface/utils.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gcc/ada/gcc-interface/utils.c') diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index ab405db..062df3a 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -918,8 +918,6 @@ rest_of_record_type_compilation (tree record_type) TYPE_SIZE_UNIT (new_record_type) = size_int (TYPE_ALIGN (record_type) / BITS_PER_UNIT); - add_parallel_type (TYPE_STUB_DECL (record_type), new_record_type); - /* Now scan all the fields, replacing each field with a new field corresponding to the new encoding. */ for (old_field = TYPE_FIELDS (record_type); old_field; @@ -1058,7 +1056,12 @@ rest_of_record_type_compilation (tree record_type) TYPE_FIELDS (new_record_type) = nreverse (TYPE_FIELDS (new_record_type)); - rest_of_type_decl_compilation (TYPE_STUB_DECL (new_record_type)); + /* We used to explicitly invoke rest_of_type_decl_compilation on the + parallel type for the sake of STABS. We don't do it any more, so + as to ensure that the parallel type be processed after the type + by the debug back-end and, thus, prevent it from interfering with + the processing of a recursive type. */ + add_parallel_type (TYPE_STUB_DECL (record_type), new_record_type); } rest_of_type_decl_compilation (TYPE_STUB_DECL (record_type)); -- cgit v1.1