summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_aggr.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-26 12:29:41 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-26 12:29:41 +0000
commit707699278c9eb45735854412512aaf9ddb0f0528 (patch)
tree5420010f2d8952a835be61c074615295b46149c6 /gcc/ada/sem_aggr.adb
parentbe2c9eb1d35af88416945dca28bb347e03d928fd (diff)
downloadgcc-707699278c9eb45735854412512aaf9ddb0f0528.tar.gz
2004-04-26 Thomas Quinot <quinot@act-europe.fr>
* sem_dist.adb, exp_dist.adb: When constructing a RAS value for a local subprogram for which no pragma All_Calls_Remote applies, store the address of the real subprogram in the underlying record type, so local dereferences do not go through the PCS. 2004-04-26 Robert Dewar <dewar@gnat.com> * i-c.ads: Add some type qualifications to avoid ambiguities when compiling with s-auxdec.ads and a non-private address type. 2004-04-26 Arnaud Charlet <charlet@act-europe.fr> * Makefile.rtl: Fix error in previous check-in: Add s-addope.o to non tasking object list (rather than tasking object list). 2004-04-26 Javier Miranda <miranda@gnat.com> * sem_aggr.adb: Fix typo in comments (Resolve_Aggr_Expr): Propagate the type to the nested aggregate. Required to check the null-exclusion attribute. * sem_attr.adb (Resolve_Attribute): Check the accessibility level in case of anonymous access types in record and array components. For a component definition the level is the same of the enclosing composite type. * sem_ch3.adb (Analyze_Component_Declaration): In case of components that are anonymous access types the level of accessibility depends on the enclosing type declaration. In order to have this information, set the scope of the anonymous access type to the enclosing record type declaration. (Array_Type_Declaration): In case of components that are anonymous access types the level of accessibility depends on the enclosing type declaration. In order to have this information, set the scope of the anonymous access type to the enclosing array type declaration. * sem_ch3.adb (Array_Type_Declaration): Set the scope of the anonymous access type. * sem_ch8.adb (Analyze_Object_Renaming): Add check to verify that renaming of anonymous access-to-constant types allowed if and only if the renamed object is access-to-constant. * sem_util.adb (Type_Access_Level): In case of anonymous access types that are component_definition or discriminants of a nonlimited type, the level is the same as that of the enclosing component type. 2004-04-26 Sergey Rybin <rybin@act-europe.fr> * sem_elim.adb: Some minor code reorganization from code reading. Fix misprint in the function name (File_Name_Match). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
-rw-r--r--gcc/ada/sem_aggr.adb10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 4d8a67d9a17..e9d63ee2562 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -960,7 +960,7 @@ package body Sem_Aggr is
Aggr_Typ : constant Entity_Id := Etype (Typ);
-- This is the unconstrained array type, which is the type
- -- against which the aggregate is to be resoved. Typ itself
+ -- against which the aggregate is to be resolved. Typ itself
-- is the array type of the context which may not be the same
-- subtype as the subtype for the final aggregate.
@@ -977,7 +977,7 @@ package body Sem_Aggr is
-- formal parameter. Consequently we also need to test for
-- N_Procedure_Call_Statement or N_Function_Call.
- Set_Etype (N, Aggr_Typ); -- may be overridden later on.
+ Set_Etype (N, Aggr_Typ); -- may be overridden later on
-- Ada 0Y (AI-231): Propagate the null_exclusion attribute to the
-- components of the array aggregate
@@ -1399,6 +1399,12 @@ package body Sem_Aggr is
end if;
end if;
+ -- Ada 0Y (AI-231): Propagate the type to the nested aggregate.
+ -- Required to check the null-exclusion attribute (if present).
+ -- This value may be overridden later on.
+
+ Set_Etype (Expr, Etype (N));
+
Resolution_OK := Resolve_Array_Aggregate
(Expr, Nxt_Ind, Nxt_Ind_Constr, Component_Typ, Others_Allowed);