[Ada] Crash on subtype of fixed-point type
authorEd Schonberg <schonberg@adacore.com>
Wed, 24 Jun 2020 17:24:49 +0000 (13:24 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 15 Oct 2020 09:39:12 +0000 (05:39 -0400)
commit7e37c1a522eca7dbe88ec58d22a88362df572758
tree623e3ecc298c0d32bd6e14573fc2db9c9c502076
parente4f503be5d8f4b6f985f91ffe8a42ed9663466b3
[Ada] Crash on subtype of fixed-point type

gcc/ada/

* freeze.adb (Freeze_Fixed_Point_Type): Do not scale the bounds
of a declared subtype using the 'Small of the type;  this is
done during resolution of the bound itself, unlike what is done
for the bounds of the base type, which are used to determine its
required size. Previous code performed this scaling twice,
leading to meaningless values for such a subtype.
gcc/ada/freeze.adb