aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-04-17 10:22:40 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-04-17 10:22:40 +0000
commit51c5169c60be01c229b8637d11283d843bc6e126 (patch)
tree5ab97c5d9cfe522c640e3afb90d15f8809fb181e /gcc/ada/gcc-interface/decl.c
parent54333b7cda497346b2f56b79b76d52a8dab7a174 (diff)
downloadgcc-51c5169c60be01c229b8637d11283d843bc6e126.zip
gcc-51c5169c60be01c229b8637d11283d843bc6e126.tar.gz
gcc-51c5169c60be01c229b8637d11283d843bc6e126.tar.bz2
decl.c (gnat_to_gnu_entity): Declare the padded type built for the return type if it is unconstrained.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the padded type built for the return type if it is unconstrained. From-SVN: r172608
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c7
1 files changed, 7 insertions, 0 deletions
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;
}