diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-25 15:41:04 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2017-04-25 15:41:04 +0200 |
commit | bf604a5eeb4b942348e8f1cdaf4baf6d77497aec (patch) | |
tree | 3c50c75a81069576fb48b9af44f1bf9960bb974f /gcc/ada/sem_dim.adb | |
parent | 178c3cba2df14a093537dbd9ffbf639510bd5b55 (diff) | |
download | gcc-bf604a5eeb4b942348e8f1cdaf4baf6d77497aec.zip gcc-bf604a5eeb4b942348e8f1cdaf4baf6d77497aec.tar.gz gcc-bf604a5eeb4b942348e8f1cdaf4baf6d77497aec.tar.bz2 |
[multiple changes]
2017-04-25 Hristian Kirtchev <kirtchev@adacore.com>
* exp_util.adb (Known_Non_Null): Moved to Sem_Util.
(Known_Null): Moved to Sem_Util.
* exp_util.ads (Known_Non_Null): Moved to Sem_Util.
(Known_Null): Moved to Sem_Util.
* sem_util.adb Add new enumeration type Null_Status_Kind.
(Known_Non_Null): Moved from Exp_Util. Most of the logic in
this routine is now carried out by Null_Status.
(Known_Null): Moved from Exp_Util. Most of the logic in this routine
is now carried out by Null_Status.
(Null_Status): New routine.
* sem_util.ads (Known_Non_Null): Moved from Exp_Util.
(Known_Null): Moved from Exp_Util.
2017-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_ch6.adb (Analyze_Expression_Function): Do not report an
error on the return type of an expression function that is a
completion, if the type is derived from a generic formal type.
2017-04-25 Ed Schonberg <schonberg@adacore.com>
* sem_dim.adb (Dimensions_Of_Operand): The dimensions of a type
conversion are those of the target type.
2017-04-25 Bob Duff <duff@adacore.com>
* a-clrefi.adb: Minor cleanup.
From-SVN: r247236
Diffstat (limited to 'gcc/ada/sem_dim.adb')
-rw-r--r-- | gcc/ada/sem_dim.adb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/sem_dim.adb b/gcc/ada/sem_dim.adb index c5eda0c..64a5f5b 100644 --- a/gcc/ada/sem_dim.adb +++ b/gcc/ada/sem_dim.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2016, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2017, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1376,6 +1376,13 @@ package body Sem_Dim is return Dimensions_Of (Etype (N)); end if; + -- A type conversion may have been inserted to rewrite other + -- expressions, e.g. function returns. Dimensions are those of + -- the target type. + + elsif Nkind (N) = N_Type_Conversion then + return Dimensions_Of (Etype (N)); + -- Otherwise return the default dimensions else |