aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_dim.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-09-07 11:40:16 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-09-07 11:40:16 +0200
commit1155ae01593b0b84cddf5031b7a85d684fe0dd0d (patch)
tree317aae64851186240dd41fa497b899b1e385b800 /gcc/ada/sem_dim.ads
parent0691ed6bd62582c22a33c42aa8f5303815a032af (diff)
downloadgcc-1155ae01593b0b84cddf5031b7a85d684fe0dd0d.zip
gcc-1155ae01593b0b84cddf5031b7a85d684fe0dd0d.tar.gz
gcc-1155ae01593b0b84cddf5031b7a85d684fe0dd0d.tar.bz2
[multiple changes]
2017-09-07 Arnaud Charlet <charlet@adacore.com> * sem_prag.adb (Find_Role): The Global_Seen flag is now consulted not only for abstract states and variables, but for all kinds of items. (Collect_Subprogram_Inputs_Outputs): Do not process formal generic parameters, because unlike ordinary formal parameters, generic formals only act as input/ outputs if they are explicitly mentioned in a Global contract. 2017-09-07 Yannick Moy <moy@adacore.com> * ghost.adb (Check_Ghost_Context): Do not err on ghost code inside predicate procedure. Check predicate pragma/aspect with Ghost entity. * exp_ch6.adb, par-ch6.adb, sem_ch13.adb, sem_prag.adb; Minor reformatting. 2017-09-07 Ed Schonberg <schonberg@adacore.com> * sem_aggr.adb: Move New_Copy_Tree_And_Dimensions to sem_dim (code cleanup); * sem_ch3.adb (Build_Derived_Record_Type):i Call Copy_Dimensions_Of_Components after creating the copy of the record declaration. * sem_dim.ads, sem_dim.adb (Copy_Dimensions_Of_Components): For a derived recor type, copy the dikensions if any of each component of the parent record to the corresponding component declarations of the derived record. These expressions are used among other things as default values in aggregates with box associations. * a-dirval-mingw.adb, g-cgi.adb, gnatcmd.adb, lib-xref.adb, repinfo.adb, sem_attr.adb, sem_ch10.adb, sem_ch6.adb, sem_prag.adb: Minor reformatting. 2017-09-07 Arnaud Charlet <charlet@adacore.com> * sem_util.adb: Remove extra space after THEN. 2017-09-07 Eric Botcazou <ebotcazou@adacore.com> * sem_ch7.adb (Has_Referencer): For a subprogram renaming, also mark the renamed subprogram as referenced. From-SVN: r251836
Diffstat (limited to 'gcc/ada/sem_dim.ads')
-rw-r--r--gcc/ada/sem_dim.ads14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ada/sem_dim.ads b/gcc/ada/sem_dim.ads
index bad3bf2..9452d7a 100644
--- a/gcc/ada/sem_dim.ads
+++ b/gcc/ada/sem_dim.ads
@@ -189,6 +189,20 @@ package Sem_Dim is
-- node that is allowed to contain a dimension (see OK_For_Dimension in
-- body of Sem_Dim).
+ procedure Copy_Dimensions_Of_Components (Rec : Entity_Id);
+ -- Propagate the dimensions of the components of a record type T to the
+ -- components of a record type derived from T. The derivation creates
+ -- a full copy of the type declaration of the parent, and the dimension
+ -- information of individual components must be transferred explicitly.
+
+ function New_Copy_Tree_And_Copy_Dimensions
+ (Source : Node_Id;
+ Map : Elist_Id := No_Elist;
+ New_Sloc : Source_Ptr := No_Location;
+ New_Scope : Entity_Id := Empty) return Node_Id;
+ -- Same as New_Copy_Tree (defined in Sem_Util), except that this routine
+ -- also copies the dimensions of Source to the returned node.
+
function Dimensions_Match (T1 : Entity_Id; T2 : Entity_Id) return Boolean;
-- If the common base type has a dimension system, verify that two
-- subtypes have the same dimensions. Used for conformance checking.