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]

[Ada] Skip derived types treatment for subprogram types

This makes it so that the special code dealing with alias sets for derived 
types is skipped for subprogram types

Tested on x86_64-suse-linux, applied on the mainline.

2015-02-08  Eric Botcazou  <>

	* gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
	sets in presence of derivation for subprogram types.

Eric Botcazou
Index: gcc-interface/decl.c
--- gcc-interface/decl.c	(revision 220509)
+++ gcc-interface/decl.c	(working copy)
@@ -5138,7 +5138,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
 	 to conflict with Comp2 and an alias set copy is required.
 	 The language rules ensure the parent type is already frozen here.  */
-      if (Is_Derived_Type (gnat_entity) && !type_annotate_only)
+      if (kind != E_Subprogram_Type
+	  && Is_Derived_Type (gnat_entity)
+	  && !type_annotate_only)
 	  Entity_Id gnat_parent_type = Underlying_Type (Etype (gnat_entity));
 	  /* For constrained packed array subtypes, the implementation type is

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