aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils2.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2010-04-11 11:49:22 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2010-04-11 11:49:22 +0000
commit3cd64bab882b6bebb364ba7df6da511552124feb (patch)
tree4de7dc724b7c55a6130ca6a06a873f4b2cfaaf7e /gcc/ada/gcc-interface/utils2.c
parent87fa3d342b62a632f1e44008c18bc60a9ac90af1 (diff)
downloadgcc-3cd64bab882b6bebb364ba7df6da511552124feb.zip
gcc-3cd64bab882b6bebb364ba7df6da511552124feb.tar.gz
gcc-3cd64bab882b6bebb364ba7df6da511552124feb.tar.bz2
trans.c (lvalue_required_for_attribute_p): New static function.
* gcc-interface/trans.c (lvalue_required_for_attribute_p): New static function. (lvalue_required_p) <N_Attribute_Reference>: Call it. (gnat_to_gnu) <N_Selected_Component>: Prevent build_component_ref from folding the result only if lvalue_required_for_attribute_p is true. * gcc-interface/utils.c (maybe_unconstrained_array): Pass correctly typed constant to build_component_ref. (unchecked_convert): Likewise. * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise. (build_allocator): Likewise. From-SVN: r158202
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r--gcc/ada/gcc-interface/utils2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c
index 29d60da..7d78c25 100644
--- a/gcc/ada/gcc-interface/utils2.c
+++ b/gcc/ada/gcc-interface/utils2.c
@@ -1812,7 +1812,7 @@ maybe_wrap_malloc (tree data_size, tree data_type, Node_Id gnat_node)
tree aligning_field
= build_component_ref (aligning_record, NULL_TREE,
- TYPE_FIELDS (aligning_type), 0);
+ TYPE_FIELDS (aligning_type), false);
tree aligning_field_addr
= build_unary_op (ADDR_EXPR, NULL_TREE, aligning_field);
@@ -2003,7 +2003,7 @@ build_allocator (tree type, tree init, tree result_type, Entity_Id gnat_proc,
build_component_ref
(build_unary_op (INDIRECT_REF, NULL_TREE,
convert (storage_ptr_type, storage)),
- NULL_TREE, TYPE_FIELDS (storage_type), 0),
+ NULL_TREE, TYPE_FIELDS (storage_type), false),
build_template (template_type, type, NULL_TREE)),
convert (result_type, convert (storage_ptr_type, storage)));
}