[Ada] Fix incorrect fixed-point computation in expression function
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 19 Nov 2021 17:24:01 +0000 (18:24 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 1 Dec 2021 10:24:43 +0000 (10:24 +0000)
commit82a7daa31a31922bbe44a878cd0313c048a02130
tree9db7700054d45266272e1ebf755106c0b318d2b1
parentba12deb95594b898094b199f9f5ec1a52542be6b
[Ada] Fix incorrect fixed-point computation in expression function

gcc/ada/

* einfo.ads (E_Decimal_Fixed_Point_Subtype): Fix pasto.
* freeze.adb (Freeze_Fixed_Point_Type): Retrieve the underlying type
of the first subtype and do not use a stale value of Small_Value.
* sem_res.adb (Resolve_Real_Literal): In the case of a fixed-point
type, make sure that the base type is frozen and use its Small_Value
to compute the corresponding integer value of the literal.
gcc/ada/einfo.ads
gcc/ada/freeze.adb
gcc/ada/sem_res.adb