diff options
author | Ed Schonberg <schonberg@adacore.com> | 2018-05-28 08:54:34 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-05-28 08:54:34 +0000 |
commit | f4bf7b62faf2fa3db8f1d79659c703d24fc6a555 (patch) | |
tree | d5fac07458789707400cef1d8ba31201424bd86f | |
parent | 577ad216dc16802d1eeed14a3948ed3bacac30e6 (diff) | |
download | gcc-f4bf7b62faf2fa3db8f1d79659c703d24fc6a555.zip gcc-f4bf7b62faf2fa3db8f1d79659c703d24fc6a555.tar.gz gcc-f4bf7b62faf2fa3db8f1d79659c703d24fc6a555.tar.bz2 |
[Ada] Don't create empty activation records
2018-05-28 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* exp_unst.adb (Unnest_Subprogram): Prevent creation of empty
activation records.
From-SVN: r260831
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/exp_unst.adb | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index d724ee9..8b0951c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-05-28 Ed Schonberg <schonberg@adacore.com> + + * exp_unst.adb (Unnest_Subprogram): Prevent creation of empty + activation records. + 2018-05-28 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * exp_unst.adb (Check_Static_Type): Add argument to indicate node to be diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb index fbc52b7..e2ecafc 100644 --- a/gcc/ada/exp_unst.adb +++ b/gcc/ada/exp_unst.adb @@ -411,10 +411,13 @@ package body Exp_Unst is -- Entity name case. Make sure that the entity is declared -- in a subprogram. This may not be the case for for a type -- in a loop appearing in a precondition. + -- Exclude explicitly discriminants (that can appear + -- in bounds of discriminated components). if Is_Entity_Name (N) then if Present (Entity (N)) and then Present (Enclosing_Subprogram (Entity (N))) + and then Ekind (Entity (N)) /= E_Discriminant then Note_Uplevel_Ref (E => Entity (N), |