Do not make a local copy of large aggregate
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 9 May 2020 20:44:39 +0000 (22:44 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sat, 9 May 2020 20:44:39 +0000 (22:44 +0200)
commit527ed00b715bf4a945284722b7e766a4f763049f
treed0aa44f1dfd8f91695a2eeb9bbd65a4ae69444b5
parentaff220748ca669d4338c5ac6f0b210a29f90bbab
Do not make a local copy of large aggregate

This prevents gigi from making a local copy of large aggregates.

* gcc-interface/trans.c (lvalue_required_p) <N_Selected_Component>:
Merge with N_Slice.
<N_Allocator>: Move to...
(lvalue_for_aggregate_p): ...here.  New function.
(Identifier_to_gnu): For an identifier with aggregate type, also
call lvalue_for_aggregate_p if lvalue_required_p returned false
before substituting the identifier with the constant.
gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c