This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Ada] Add descriptive link in packed array encoding

> 2009-04-23  Eric Botcazou  <>
> 	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>
> 	For packed array types, make the original array type a parallel type
> 	for the modular type and its JM wrapper if the type is bit-packed.
> 	<E_Array_Subtype>: Likewise.  Do not generate the special XA parallel
> 	record type for packed array types.  Remove kludge.

The kludge is still needed for now.  Applied on the mainline.

2009-04-25  Eric Botcazou  <>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Put
	back kludge.

Eric Botcazou
Index: gcc-interface/decl.c
--- gcc-interface/decl.c	(revision 146740)
+++ gcc-interface/decl.c	(working copy)
@@ -2546,9 +2546,14 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
 					* Treat_As_Volatile (gnat_entity))));
+	  /* Make it artificial only if the base type was artificial as well.
+	     That's sort of "morally" true and will make it possible for the
+	     debugger to look it up by name in DWARF, which is necessary in
+	     order to decode the packed array type.  */
 	    = create_type_decl (gnu_entity_name, gnu_type, attr_list,
-				!Comes_From_Source (gnat_entity),
+				!Comes_From_Source (gnat_entity)
+				&& !Comes_From_Source (Etype (gnat_entity)),
 				debug_info_p, gnat_entity);
 	  /* Save it as our equivalent in case the call below elaborates

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]