diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2011-04-02 09:38:22 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-04-02 09:38:22 +0000 |
commit | 8ffac116df93baf38130a6a7de2d419b04dae660 (patch) | |
tree | 42940b22d690719ccf797ddfd601469fcfa24885 /gcc/ada/gcc-interface/utils2.c | |
parent | de9528f0291faf10d65dd7b00f7101005c2ee38a (diff) | |
download | gcc-8ffac116df93baf38130a6a7de2d419b04dae660.zip gcc-8ffac116df93baf38130a6a7de2d419b04dae660.tar.gz gcc-8ffac116df93baf38130a6a7de2d419b04dae660.tar.bz2 |
utils2.c (build_allocator): In the unconstrained array type case...
* gcc-interface/utils2.c (build_allocator): In the unconstrained array
type case, do not strip a padding type around the array type.
From-SVN: r171888
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 78f5fd9..240d345 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -2135,17 +2135,9 @@ build_allocator (tree type, tree init, tree result_type, Entity_Id gnat_proc, gnat_proc, gnat_pool, gnat_node); storage = convert (storage_ptr_type, gnat_protect_expr (storage)); - if (TYPE_IS_PADDING_P (type)) - { - type = TREE_TYPE (TYPE_FIELDS (type)); - if (init) - init = convert (type, init); - } - - /* If there is an initializing expression, make a constructor for - the entire object including the bounds and copy it into the - object. If there is no initializing expression, just set the - bounds. */ + /* If there is an initializing expression, then make a constructor for + the entire object including the bounds and copy it into the object. + If there is no initializing expression, just set the bounds. */ if (init) { VEC(constructor_elt,gc) *v = VEC_alloc (constructor_elt, gc, 2); @@ -2154,7 +2146,6 @@ build_allocator (tree type, tree init, tree result_type, Entity_Id gnat_proc, build_template (template_type, type, init)); CONSTRUCTOR_APPEND_ELT (v, DECL_CHAIN (TYPE_FIELDS (storage_type)), init); - return convert (result_type, build2 (COMPOUND_EXPR, storage_ptr_type, |