diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-02 08:04:47 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-02 08:04:47 +0000 |
commit | 61016a7a3c6006164ca50b7b0203d31c8bfd24c6 (patch) | |
tree | ff87aebf201b633f8c9217e599e37bf01db0773c /gcc/ada/sem_dim.adb | |
parent | 63c3ac7774ee8a271ba4929a670e753ef3a025fe (diff) | |
download | gcc-61016a7a3c6006164ca50b7b0203d31c8bfd24c6.tar.gz |
2012-10-02 Robert Dewar <dewar@adacore.com>
* sem_dim.adb: Minor code reorganization.
* sem_dim.ads: Add comment.
2012-10-02 Robert Dewar <dewar@adacore.com>
* checks.ads, exp_ch4.adb, checks.adb
(Minimize_Eliminate_Overflow_Checks): Add Top_Level parameter to avoid
unnecessary conversions to Bignum.
Minor reformatting.
2012-10-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Process_PPCs): Generate invariant checks for a
return value whose type is an access type and whose designated
type has invariants. Ditto for in-out parameters and in-parameters
of an access type.
* exp_ch3.adb (Build_Component_Invariant_Call): Add invariant check
for an access component whose designated type has invariants.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191956 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_dim.adb')
-rw-r--r-- | gcc/ada/sem_dim.adb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ada/sem_dim.adb b/gcc/ada/sem_dim.adb index e25c1589881..15b32dca7fc 100644 --- a/gcc/ada/sem_dim.adb +++ b/gcc/ada/sem_dim.adb @@ -2206,13 +2206,14 @@ package body Sem_Dim is Dims_Of_From : constant Dimension_Type := Dimensions_Of (From); begin + -- Ignore if not Ada 2012 or beyond + if Ada_Version < Ada_2012 then return; - end if; - -- Copy the dimension of 'From to 'To' + -- For Ada 2012, Copy the dimension of 'From to 'To' - if Exists (Dims_Of_From) then + elsif Exists (Dims_Of_From) then Set_Dimensions (To, Dims_Of_From); end if; end Copy_Dimensions; @@ -2730,14 +2731,14 @@ package body Sem_Dim is -- Look for a symbols parameter association in the list of actuals while Present (Actual) loop + -- Positional parameter association case when the actual is a -- string literal. if Nkind (Actual) = N_String_Literal then Actual_Str := Actual; - -- Named parameter association case when the selector name is - -- Symbol. + -- Named parameter association case when selector name is Symbol elsif Nkind (Actual) = N_Parameter_Association and then Chars (Selector_Name (Actual)) = Name_Symbol @@ -2751,6 +2752,7 @@ package body Sem_Dim is end if; if Present (Actual_Str) then + -- Return True if the actual comes from source or if the string -- of symbols doesn't have the default value (i.e. it is ""). @@ -3206,7 +3208,8 @@ package body Sem_Dim is return Is_RTU (E, System_Dim_Float_IO) - or Is_RTU (E, System_Dim_Integer_IO); + or else + Is_RTU (E, System_Dim_Integer_IO); end Is_Dim_IO_Package_Entity; ------------------------------------- |