diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-11-20 15:24:21 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-11-20 15:24:21 +0100 |
commit | d8d7e809d6c6ce977e188f99e104097b5ece31d8 (patch) | |
tree | a5c49e3dca4040fbe6600f1168ef61593ec7cbe7 /gcc/ada/sem_aggr.adb | |
parent | f2d9ae209afbf4486850f531ebe091953f1f72f9 (diff) | |
download | gcc-d8d7e809d6c6ce977e188f99e104097b5ece31d8.zip gcc-d8d7e809d6c6ce977e188f99e104097b5ece31d8.tar.gz gcc-d8d7e809d6c6ce977e188f99e104097b5ece31d8.tar.bz2 |
[multiple changes]
2014-11-20 Bob Duff <duff@adacore.com>
* debug.adb: Minor comment fix.
2014-11-20 Arnaud Charlet <charlet@adacore.com>
* a-ciorma.adb: Minor update: move pragma Annotate up.
* a-cfdlli.adb: Skip codepeer analysis on this body.
2014-11-20 Robert Dewar <dewar@adacore.com>
* sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
Allow use of this pragma with generic unit (package or subprogram).
* gnat_rm.texi: Clarify that pragma No_Elaboration_Code_All can
be applied to generics.
2014-11-20 Ed Schonberg <schonberg@adacore.com>
* sem_aggr.adb (Valid_Limited_Ancestor): Ancestor part of
extension aggregate can itself be an extension aggregate, as
well as a call that is rewritten as a reference.
2014-11-20 Eric Botcazou <ebotcazou@adacore.com>
* inline.adb (Add_Inlined_Subprogram): Insert all programs
generated as a body or whose declaration was provided along with
the body.
2014-11-20 Javier Miranda <miranda@adacore.com>
* sem.adb (Semantics): Disable expansion if we are compiling a
separate unit under configurable runtime. By default separate
units are compiled with expansion disabled but under configurable
runtime we enable the expansion to get error messages about
missing entities.
From-SVN: r217855
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
-rw-r--r-- | gcc/ada/sem_aggr.adb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb index 654f413..82d6ce0 100644 --- a/gcc/ada/sem_aggr.adb +++ b/gcc/ada/sem_aggr.adb @@ -2663,12 +2663,19 @@ package body Sem_Aggr is function Valid_Limited_Ancestor (Anc : Node_Id) return Boolean is begin - if Is_Entity_Name (Anc) - and then Is_Type (Entity (Anc)) + if Is_Entity_Name (Anc) and then Is_Type (Entity (Anc)) then + return True; + + -- The ancestor must be a call or an aggregate, but a call may + -- have been expanded into a temporary, so check original node. + + elsif Nkind_In (Anc, N_Aggregate, + N_Extension_Aggregate, + N_Function_Call) then return True; - elsif Nkind_In (Anc, N_Aggregate, N_Function_Call) then + elsif Nkind (Original_Node (Anc)) = N_Function_Call then return True; elsif Nkind (Anc) = N_Attribute_Reference |