diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2014-10-27 11:19:41 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2014-10-27 11:19:41 +0000 |
commit | 8c44fc0f2305f051c9631b4ab3f46417bfe0d644 (patch) | |
tree | 96a95cb33de3391c4a2f50123941d5368fe48d07 /gcc/ada/gcc-interface/decl.c | |
parent | 33ccc5363ec5994c39048b1aa18e6ae6e35aa2a9 (diff) | |
download | gcc-8c44fc0f2305f051c9631b4ab3f46417bfe0d644.zip gcc-8c44fc0f2305f051c9631b4ab3f46417bfe0d644.tar.gz gcc-8c44fc0f2305f051c9631b4ab3f46417bfe0d644.tar.bz2 |
decl.c (gnat_to_gnu_entity): Apply special treatment of derived packed array types to constrained subtypes only.
* gcc-interface/decl.c (gnat_to_gnu_entity): Apply special treatment
of derived packed array types to constrained subtypes only.
From-SVN: r216727
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 97fd3b5..626f09a 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -5083,8 +5083,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) if (Is_Derived_Type (gnat_entity) && !type_annotate_only) { Entity_Id gnat_parent_type = Underlying_Type (Etype (gnat_entity)); - /* For packed array subtypes, the implementation type is used. */ + /* For constrained packed array subtypes, the implementation type is + used instead of the nominal type. */ if (kind == E_Array_Subtype + && Is_Constrained (gnat_entity) && Present (Packed_Array_Impl_Type (gnat_parent_type))) gnat_parent_type = Packed_Array_Impl_Type (gnat_parent_type); relate_alias_sets (gnu_type, gnat_to_gnu_type (gnat_parent_type), |