summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_dim.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-02 08:19:14 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-02 08:19:14 +0000
commitfb0ac55984bfa884b01e2b013fd9ef6a9f66292e (patch)
treef5aad546b751a3741904e051f9156b42eb05c3c5 /gcc/ada/sem_dim.adb
parentcac18f71cfb0f25716bd3617b56d92615cb2ec39 (diff)
downloadgcc-fb0ac55984bfa884b01e2b013fd9ef6a9f66292e.tar.gz
2012-10-02 Vincent Pucci <pucci@adacore.com>
* sem_attr.adb (Analyze_Attribute): Check dimension for attribute Old before it gets expanded. * sem_dim.adb (Analyze_Dimension_Has_Etype): Correctly propagate dimensions for identifier. 2012-10-02 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop): Handle properly the case where the iterator type is derived locally from an instantiation of Ada.Iterators_Interface. * exp_ch7.adb (Establish_Transient_Scope): Do not create a transient scope if within the expansion of an iterator loop, because a transient block already exists. 2012-10-02 Vincent Celier <celier@adacore.com> * gnatcmd.adb: Use absolute path for configuration pragmas files * make.adb (Configuration_Pragmas_Switch.Absolute_Path): Moved to Makeutl. * makeutl.ads, makeutl.adb (Absolute_Path): New function, moved from make.adb. 2012-10-02 Vincent Celier <celier@adacore.com> * prj-part.adb (Post_Parse_Context_Clause): Resurrect Boolean parameter In_Limited. Check for circularity also if In_Limited is True. (Parse_Single_Project): Call Post_Parse_Context_Clause with In_Limited parameter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191961 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_dim.adb')
-rw-r--r--gcc/ada/sem_dim.adb16
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ada/sem_dim.adb b/gcc/ada/sem_dim.adb
index ca7f3b2899f..163c93b789f 100644
--- a/gcc/ada/sem_dim.adb
+++ b/gcc/ada/sem_dim.adb
@@ -1925,12 +1925,18 @@ package body Sem_Dim is
Set_Dimensions (N, Dims_Of_Etyp);
-- Identifier case. Propagate the dimensions from the entity for
- -- identifier whose entity is a non-dimensionless consant.
+ -- identifier whose entity is a non-dimensionless constant.
- elsif Nkind (N) = N_Identifier
- and then Exists (Dimensions_Of (Entity (N)))
- then
- Set_Dimensions (N, Dimensions_Of (Entity (N)));
+ elsif Nkind (N) = N_Identifier then
+ Analyze_Dimension_Identifier : declare
+ Id : constant Entity_Id := Entity (N);
+ begin
+ if Ekind (Id) = E_Constant
+ and then Exists (Dimensions_Of (Id))
+ then
+ Set_Dimensions (N, Dimensions_Of (Id));
+ end if;
+ end Analyze_Dimension_Identifier;
-- Attribute reference case. Propagate the dimensions from the prefix.