aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/decl.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 3e85959..8f52d5a 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
+ padded type built for the return type if it is unconstrained.
+
2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
* gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index bc6b9cc..185df85 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -4068,6 +4068,13 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
max_size (TYPE_SIZE (gnu_return_type),
true),
0, gnat_entity, false, false, false, true);
+
+ /* Declare it now since it will never be declared otherwise.
+ This is necessary to ensure that its subtrees are properly
+ marked. */
+ create_type_decl (TYPE_NAME (gnu_return_type), gnu_return_type,
+ NULL, true, debug_info_p, gnat_entity);
+
return_by_invisi_ref_p = true;
}