On OpenVMS targets, a configuration pragma Float_Representation indicates that the specified representation (IEEE, VAX) should be the default for predefined floating point types and for new floating point definitions.
Tested on x86_64-pc-linux-gnu, committed on trunk 2011-12-23 Geert Bosch <bo...@adacore.com> * sem_ch3.adb (Can_Derive_From): Check matching Float_Rep on VMS.
Index: sem_ch3.adb =================================================================== --- sem_ch3.adb (revision 182654) +++ sem_ch3.adb (working copy) @@ -15333,10 +15333,23 @@ Spec : constant Entity_Id := Real_Range_Specification (Def); begin + -- Check specified "digits" constraint + if Digs_Val > Digits_Value (E) then return False; end if; + -- Avoid types not matching pragma Float_Representation, if present + + if (Opt.Float_Format = 'I' and then Float_Rep (E) /= IEEE_Binary) + or else + (Opt.Float_Format = 'V' and then Float_Rep (E) /= VAX_Native) + then + return False; + end if; + + -- Check for matching range, if specified + if Present (Spec) then if Expr_Value_R (Type_Low_Bound (E)) > Expr_Value_R (Low_Bound (Spec))