exp_aggr.adb (Build_Record_Aggr_Code): If there is an aggregate for a limited ancesto...
authorEd Schonberg <schonberg@adacore.com>
Thu, 13 Dec 2007 10:24:30 +0000 (11:24 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 13 Dec 2007 10:24:30 +0000 (11:24 +0100)
commit3b9fa2df5782f5f28247f705dce8393279bf6cbf
treef380a4b9454ef01b389a5e50b4c9428061c5fa4e
parent1937a0c4c8b918c6216a0bd7e8e9b44b210712d0
exp_aggr.adb (Build_Record_Aggr_Code): If there is an aggregate for a limited ancestor part...

2007-12-06  Ed Schonberg  <schonberg@adacore.com>

* exp_aggr.adb (Build_Record_Aggr_Code): If there is an aggregate for a
limited ancestor part, initialize controllers of enclosing record
before expanding ancestor aggregate.
(Gen_Assign): If a component of the aggregate is box-initialized, add
code to call Initialize if the component is controlled, and explicit
assignment of null if the component is an access type.

Handle properly aggregates for limited types that appear in object
declarations when the aggregate contains controlled values such as
protected types.
When expanding limited aggregates into individual components, do not
call Adjust on controlled components that are limited.

From-SVN: r130828
gcc/ada/exp_aggr.adb