diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-04-20 10:32:55 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-04-20 10:32:55 +0000 |
commit | e871a8730ae8bd2a50a47a6c87691078e2e7fff6 (patch) | |
tree | ea175801501f23572184c58df3fcd73cad6a8ea7 /gcc/ada/utils.c | |
parent | def9bf340183a00cbc648eaddf24ed2d3baf32b4 (diff) | |
download | gcc-e871a8730ae8bd2a50a47a6c87691078e2e7fff6.zip gcc-e871a8730ae8bd2a50a47a6c87691078e2e7fff6.tar.gz gcc-e871a8730ae8bd2a50a47a6c87691078e2e7fff6.tar.bz2 |
decl.c (gnat_to_gnu_entity): Also promote the alignment of constant objects, but not exceptions.
* decl.c (gnat_to_gnu_entity) <object>: Also promote the alignment of
constant objects, but not exceptions.
* trans.c (add_decl_expr): Use gnat_types_compatible_p for type
compatibility test.
* utils.c (create_var_decl_1): Likewise.
* utils2.c (build_binary_op) <MODIFY_EXPR>: Also use the padded view of
the type when copying to padded object and the source is a constructor.
From-SVN: r134483
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r-- | gcc/ada/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c index cafcc2d..e3867fa 100644 --- a/gcc/ada/utils.c +++ b/gcc/ada/utils.c @@ -1447,7 +1447,7 @@ create_var_decl_1 (tree var_name, tree asm_name, tree type, tree var_init, { bool init_const = (var_init != 0 - && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (var_init)) + && gnat_types_compatible_p (type, TREE_TYPE (var_init)) && (global_bindings_p () || static_flag ? initializer_constant_valid_p (var_init, TREE_TYPE (var_init)) != 0 : TREE_CONSTANT (var_init))); |