aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-10-11 08:33:03 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2019-10-11 08:33:03 +0000
commit43b60e578393cc58f1d75387b811cc90bc74297b (patch)
tree23e1408fc88f516c0134fab884a79f2b079af7da /gcc/ada
parent104099b897fe28c5d28b81a83d7655ea3b91c0c8 (diff)
downloadgcc-43b60e578393cc58f1d75387b811cc90bc74297b.zip
gcc-43b60e578393cc58f1d75387b811cc90bc74297b.tar.gz
gcc-43b60e578393cc58f1d75387b811cc90bc74297b.tar.bz2
decl.c (Gigi_Equivalent_Type): New case.
* gcc-interface/decl.c (Gigi_Equivalent_Type) <E_Array_Subtype>: New case. Return the base type if the subtype is not constrained. From-SVN: r276865
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/decl.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 896efda..8e11108 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,10 @@
2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/decl.c (Gigi_Equivalent_Type) <E_Array_Subtype>: New
+ case. Return the base type if the subtype is not constrained.
+
+2019-10-11 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Named_{Integer|Real}>:
New case to deal with the definition of named numbers.
<E_Variable>: Minor tweaks. Set DECL_IGNORED_P on the CONST_DECL
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 4878f5e..2529824 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -5026,6 +5026,11 @@ Gigi_Equivalent_Type (Entity_Id gnat_entity)
gnat_equiv = Etype (gnat_entity);
break;
+ case E_Array_Subtype:
+ if (!Is_Constrained (gnat_entity))
+ gnat_equiv = Etype (gnat_entity);
+ break;
+
case E_Class_Wide_Type:
gnat_equiv = Root_Type (gnat_entity);
break;