This gets rid of a bogus error issued for the conversion to a static floating-point subtype of a named number which is not a machine number of this floating-point subtype but happens to be very close (or equal) to one of the nominal bounds of the subtype. This conversion may not change the value of this named number in a static context but needs to take into account the stored bounds of the subtype, which are machine numbers, to raise Constraint_Error. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_eval.adb (Eval_Type_Conversion): If the target subtype is a static floating-point subtype and the result is a real literal, consider its machine-rounded value to raise Constraint_Error. (Test_In_Range): Turn local variables into constants.