* gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 8 Feb 2015 09:24:54 +0000 (09:24 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 8 Feb 2015 09:24:54 +0000 (09:24 +0000)
sets in presence of derivation for subprogram types.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220511 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c

index ed638a6..e14b1c1 100644 (file)
@@ -1,5 +1,10 @@
 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.
+
+2015-02-08  Eric Botcazou  <ebotcazou@adacore.com>
+
        * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
        present in the same context as the declaration.
 
index 43984a2..12e5fd0 100644 (file)
@@ -5138,7 +5138,9 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
         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