diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-04 09:22:03 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-04 09:22:03 +0000 |
commit | 2e2a6452a4454bc514b7941abb5e37d331e7c954 (patch) | |
tree | e66a7f20bfc819cec36dd2b9951ce8f23678a83e /gcc/ada/sem_aggr.adb | |
parent | f1f3250a6c57dbc6e595773adf43a5181dfae467 (diff) | |
download | gcc-2e2a6452a4454bc514b7941abb5e37d331e7c954.tar.gz |
2011-08-04 Yannick Moy <moy@adacore.com>
* sem_attr.adb (Result): modify error message for misplaced 'Result
2011-08-04 Sergey Rybin <rybin@adacore.com>
* gnat_rm.texi (pragma Annotate): Fix syntax description to make it
clear that the second argument must be an identifier.
2011-08-04 Thomas Quinot <quinot@adacore.com>
* exp_ch9.adb (Build_Barrier_Function): When compiling with
-fpreserve-control-flow, insert an IF statement on the barrier
condition to ensure that a conditional branch instruction is generated.
2011-08-04 Emmanuel Briot <briot@adacore.com>
* prj-part.adb, prj.adb, prj.ads, prj-tree.ads
(Processing_Flags.Ignore_Missing_With): new flag.
2011-08-04 Emmanuel Briot <briot@adacore.com>
* prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
Source_List_File on case-insensitive systems where the file is actually
on a case-sensitive file system (NFS,...).
2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch6.adb (Analyze_Function_Return): In a rare case where a
function return contains a controlled [extension] aggregate and the
return statement is not part of a handled sequence of statements, wrap
the return in a block. This ensures that all controlled temporaries
generated during aggregate resolution will be picked up by the
finalization machinery.
2011-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
components, freeze type before resolution, to ensure that default
initializations are present for all components.
* sem_res.adb (Resolve_Actuals): the designated object of an
accces-to-constant type is a legal actual in a call to an
initialization procedure.
2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
N_Unchecked_Type_Conversion to the possible containers of a renamed
transient variable.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177343 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
-rw-r--r-- | gcc/ada/sem_aggr.adb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 050930bfa03..948410db579 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -978,6 +978,30 @@ package body Sem_Aggr is return; end if; + -- If the aggregate has box-initialized components, its type must be + -- frozen so that initialization procedures can properly be called + -- in the resolution that follows. The replacement of boxes with + -- initialization calls is properly an expansion activity but it must + -- be done during revolution. + + if Expander_Active + and then Present (Component_Associations (N)) + then + declare + Comp : Node_Id; + + begin + Comp := First (Component_Associations (N)); + while Present (Comp) loop + if Box_Present (Comp) then + Insert_Actions (N, Freeze_Entity (Typ, N)); + exit; + end if; + Next (Comp); + end loop; + end; + end if; + -- An unqualified aggregate is restricted in SPARK to: -- An aggregate item inside an aggregate for a multi-dimensional array |