diff options
author | Arnaud Charlet <charlet@adacore.com> | 2021-01-24 09:08:14 -0500 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-05-06 03:51:43 -0400 |
commit | 05b7561e370699e43513a8ba54e48a817c92281a (patch) | |
tree | 875ce5ab81bc162bf6903991b4af73b20b7be948 /gcc | |
parent | 369965ea43bf87a3b22610e8239f411d01daf969 (diff) | |
download | gcc-05b7561e370699e43513a8ba54e48a817c92281a.zip gcc-05b7561e370699e43513a8ba54e48a817c92281a.tar.gz gcc-05b7561e370699e43513a8ba54e48a817c92281a.tar.bz2 |
[Ada] Assert failure on E_Enumeration_Literal and front-end unnesting
gcc/ada/
* exp_unst.adb (Note_Uplevel_Bound): Exclude
E_Enumeration_Literal.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/exp_unst.adb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ada/exp_unst.adb b/gcc/ada/exp_unst.adb index 69506f3..dda8d86 100644 --- a/gcc/ada/exp_unst.adb +++ b/gcc/ada/exp_unst.adb @@ -527,14 +527,17 @@ 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 a type in a -- loop appearing in a precondition. - -- Exclude explicitly discriminants (that can appear - -- in bounds of discriminated components). + -- Exclude explicitly discriminants (that can appear + -- in bounds of discriminated components) and enumeration + -- literals. if Is_Entity_Name (N) then if Present (Entity (N)) and then not Is_Type (Entity (N)) and then Present (Enclosing_Subprogram (Entity (N))) - and then Ekind (Entity (N)) /= E_Discriminant + and then + Ekind (Entity (N)) + not in E_Discriminant | E_Enumeration_Literal then Note_Uplevel_Ref (E => Entity (N), |