]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Get rid of more references to Universal_Integer in expanded code
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 8 Jan 2020 23:04:34 +0000 (00:04 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 3 Jun 2020 10:01:34 +0000 (06:01 -0400)
commit10e168cdbe4fc6ca1d42b0d56936602feb2ef38b
tree79e61cffd7f488c9e9101e25452b2713fdb596b8
parenteebcb5618002bcd30219203ce4c59b0ef809f236
[Ada] Get rid of more references to Universal_Integer in expanded code

2020-06-03  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* exp_attr.adb (Expand_N_Attribute_Reference) <Enum_Rep>:
In the case of an enumeration type, do an intermediate
conversion to a small integer type.  Remove useless stuff.
<Finalization_Size>: Do not hardcode Universal_Integer and
fix a type mismatch in the assignment to the variable.
<Max_Size_In_Storage_Elements>: Likewise.
<From_Any>: Do not redefine the Ptyp local variable.
<To_Any>: Likewise.
<TypeCode>: Likewise.
<Pos>: Small tweaks.
<Val>: For an enumeration type with standard representation,
apply the range check to the expression of a convertion to
Universal_Integer, if any.  For an integer type, expand to
a mere conversion.
gcc/ada/exp_attr.adb