aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-09-14 19:27:21 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-09-14 19:27:21 +0000
commit40c88b9403ef1e2b2e93ff70a5fb794916027665 (patch)
tree60a554690ff540bb38e350af14ceebfd44fee09f /gcc/ada/gcc-interface/decl.c
parent1d65f45cfaefa060737af130c3fc69afb3030980 (diff)
downloadgcc-40c88b9403ef1e2b2e93ff70a5fb794916027665.zip
gcc-40c88b9403ef1e2b2e93ff70a5fb794916027665.tar.gz
gcc-40c88b9403ef1e2b2e93ff70a5fb794916027665.tar.bz2
exp_dbug.ads (Packed Array Encoding): Document the new encoding for the unconstrained case.
* exp_dbug.ads (Packed Array Encoding): Document the new encoding for the unconstrained case. * gcc-interfaces/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Implement the encoding. Do not give a name to the pointer type to the XUT type. * gcc-interfaces/utils.c (gnat_pushdecl): Propagate DECL_ORIGINAL_TYPE for fat pointer types, if any. Make sure DECL_ARTIFICIAL is cleared on nodes with DECL_ORIGINAL_TYPE set. (update_pointer_to): Set DECL_ORIGINAL_TYPE to the original pointer for fat pointer types. Make sure DECL_ARTIFICIAL is cleared. From-SVN: r151697
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 255821e..ed39338 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -1782,7 +1782,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
case E_String_Type:
case E_Array_Type:
{
- Entity_Id gnat_index;
+ Entity_Id gnat_index, gnat_name;
const bool convention_fortran_p
= (Convention (gnat_entity) == Convention_Fortran);
const int ndim = Number_Dimensions (gnat_entity);
@@ -2066,8 +2066,13 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
tem, NULL, !Comes_From_Source (gnat_entity),
debug_info_p, gnat_entity);
- /* Give the fat pointer type a name. */
- create_type_decl (create_concat_name (gnat_entity, "XUP"),
+ /* Give the fat pointer type a name. If this is a packed type, tell
+ the debugger how to interpret the underlying bits. */
+ if (Present (Packed_Array_Type (gnat_entity)))
+ gnat_name = Packed_Array_Type (gnat_entity);
+ else
+ gnat_name = gnat_entity;
+ create_type_decl (create_concat_name (gnat_name, "XUP"),
gnu_fat_type, NULL, true,
debug_info_p, gnat_entity);
@@ -2075,16 +2080,11 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
record type for the object and its template with the field offsets
shifted to have the template at a negative offset. */
tem = build_unc_object_type (gnu_template_type, tem,
- create_concat_name (gnat_entity, "XUT"));
+ create_concat_name (gnat_name, "XUT"));
shift_unc_components_for_thin_pointers (tem);
SET_TYPE_UNCONSTRAINED_ARRAY (tem, gnu_type);
TYPE_OBJECT_RECORD_TYPE (gnu_type) = tem;
-
- /* Give the thin pointer type a name. */
- create_type_decl (create_concat_name (gnat_entity, "XUX"),
- build_pointer_type (tem), NULL, true,
- debug_info_p, gnat_entity);
}
break;