From: Pierre-Marie de Rodat Date: Sat, 11 Jun 2016 11:23:54 +0000 (+0000) Subject: decl.c (gnat_to_gnu_entity): Do not clobber gnat_entity_name with temporary names... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=773392af39c9e5fea4b20ef865ec1326ce885efd;p=gcc.git decl.c (gnat_to_gnu_entity): Do not clobber gnat_entity_name with temporary names for XUP and XUT types. * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber gnat_entity_name with temporary names for XUP and XUT types. From-SVN: r237324 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7576463b453..ec42a8b9496 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2016-06-11 Pierre-Marie de Rodat + + * gcc-interface/decl.c (gnat_to_gnu_entity): Do not clobber + gnat_entity_name with temporary names for XUP and XUT types. + 2016-06-10 Martin Sebor PR c/71392 diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 45878a7c635..8d4ff3fd76c 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -2335,10 +2335,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) gnat_name = Packed_Array_Impl_Type (gnat_entity); else gnat_name = gnat_entity; - if (gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL) - gnu_entity_name = create_concat_name (gnat_name, "XUP"); - create_type_decl (gnu_entity_name, gnu_fat_type, artificial_p, - debug_info_p, gnat_entity); + tree xup_name + = (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL) + ? get_entity_name (gnat_name) + : create_concat_name (gnat_name, "XUP"); + create_type_decl (xup_name, gnu_fat_type, artificial_p, debug_info_p, + gnat_entity); /* Create the type to be designated by thin pointers: a record type for the array and its template. We used to shift the fields to have the @@ -2348,11 +2350,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) Note that GDB can handle standard DWARF information for them, so we don't have to name them as a GNAT encoding, except if specifically asked to. */ - if (gnat_encodings != DWARF_GNAT_ENCODINGS_MINIMAL) - gnu_entity_name = create_concat_name (gnat_name, "XUT"); - else - gnu_entity_name = get_entity_name (gnat_name); - tem = build_unc_object_type (gnu_template_type, tem, gnu_entity_name, + tree xut_name + = (gnat_encodings == DWARF_GNAT_ENCODINGS_MINIMAL) + ? get_entity_name (gnat_name) + : create_concat_name (gnat_name, "XUT"); + tem = build_unc_object_type (gnu_template_type, tem, xut_name, debug_info_p); SET_TYPE_UNCONSTRAINED_ARRAY (tem, gnu_type);