diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-09-02 09:14:48 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-09-02 09:14:48 +0200 |
commit | f7bb41af65aa53933814ec82474497876d396b33 (patch) | |
tree | 8c77a20466ed1782c4853f1bf84f75cd195f61f7 /gcc/ada/sem_ch4.adb | |
parent | bd0bc43e58edb507c01ecabdfdf0e7717a825324 (diff) | |
download | gcc-f7bb41af65aa53933814ec82474497876d396b33.zip gcc-f7bb41af65aa53933814ec82474497876d396b33.tar.gz gcc-f7bb41af65aa53933814ec82474497876d396b33.tar.bz2 |
[multiple changes]
2011-09-02 Bob Duff <duff@adacore.com>
* einfo.adb: (Has_Xref_Entry): Do not call
Implementation_Base_Type. Lib.Xref has been
rewritten to avoid the need for it, and it was costly.
* s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
functions in support of efficient xref.
* lib-xref-alfa.adb: Misc changes related to Key component of
type Xref_Entry.
* lib-xref.adb: (Add_Entry,etc): Speed improvement.
(New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
no longer does. This is the one place where it is needed.
2011-09-02 Johannes Kanig <kanig@adacore.com>
* g-comlin.adb (Getopt): New optional argument Concatenate to have
similar interface as the other Getopt function.
2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
a call to Set_Finalize_Address if there is no allocator available.
* exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
a case of allocator expansion where the allocator is not expanded but
needs a custom allocate routine. Code reformatting.
(Is_Finalizable_Transient): Remove local variables Has_Rens and
Ren_Obj. Code reformatting.
(Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
through the use of 'reference.
* sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
as part of build-in-place expansion. They are intentionally marked as
coming from source, but their parents are not.
From-SVN: r178436
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r-- | gcc/ada/sem_ch4.adb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb index e5299b2..3f04964 100644 --- a/gcc/ada/sem_ch4.adb +++ b/gcc/ada/sem_ch4.adb @@ -490,8 +490,14 @@ package body Sem_Ch4 is Resolve (Expression (E), Type_Id); + -- Allocators generated by the build-in-place expansion mechanism + -- are explicitly marked as coming from source but do not need to be + -- checked for limited initialization. To exclude this case, ensure + -- that the parent of the allocator is a source node. + if Is_Limited_Type (Type_Id) and then Comes_From_Source (N) + and then Comes_From_Source (Parent (N)) and then not In_Instance_Body then if not OK_For_Limited_Init (Type_Id, Expression (E)) then |