[Ada] Fix handling of 'Enum_Rep and renamings
authorArnaud Charlet <charlet@adacore.com>
Fri, 14 Feb 2020 16:50:12 +0000 (11:50 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 8 Jun 2020 07:51:09 +0000 (03:51 -0400)
commit8eda13a49e566270f04323dbec11b2e86d3ddccc
tree9b7dc49e241f354e1856a5c3487e048b5d740e12
parentbbe7d67f5ffdadeee67e0060bde212d09e38a704
[Ada] Fix handling of 'Enum_Rep and renamings

2020-06-08  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

* sem_eval.adb (Eval_Type_Conversion): Fix handling of
enumeration to integer conversions.
* exp_attr.adb (Expand_N_Attribute_Reference
[Attribute_Enum_Rep]): Remove special casing for first-level
renaming, best left to the general folding mechanism via
Eval_Type_Conversion.
gcc/ada/exp_attr.adb
gcc/ada/sem_eval.adb