From 9d11273c622b4b50d5bc5a4c9b382fd2b2dddaee Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sun, 8 Feb 2015 09:24:54 +0000 Subject: [PATCH] decl.c (gnat_to_gnu_entity): Do not bother about alias sets in presence of derivation for subprogram types. * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias sets in presence of derivation for subprogram types. From-SVN: r220511 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/decl.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ed638a61c5e..e14b1c1c34d 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +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. + 2015-02-08 Eric Botcazou * gcc-interface/utils.c (begin_subprog_body): Assert that the body is diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 43984a20e7b..12e5fd0b6bb 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -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 -- 2.30.2