This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Ada] Skip derived types treatment for subprogram types
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 08 Feb 2015 10:22:02 +0100
- Subject: [Ada] Skip derived types treatment for subprogram types
- Authentication-results: sourceware.org; auth=none
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 <ebotcazou@adacore.com>
* 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