OSDN Git Service

* gcc-interface/trans.c (lvalue_required_for_attribute_p): New static
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 11 Apr 2010 11:49:22 +0000 (11:49 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 11 Apr 2010 11:49:22 +0000 (11:49 +0000)
commitc92ff1b0dc0734b64f6a653441c1b306d2782429
tree4de7dc724b7c55a6130ca6a06a873f4b2cfaaf7e
parent3a701cae672f8f63a4472c34bae9f32975b9663b
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158202 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c
gcc/ada/gcc-interface/utils.c
gcc/ada/gcc-interface/utils2.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/aggr12.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/aggr12.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/pack9.adb