1-- { dg-do run } 2 3procedure Float_Attributes_Overflows is 4 5 generic 6 type Float_Type is digits <>; 7 procedure Test_Float_Type; 8 9 procedure Test_Float_Type is 10 Biggest_Positive_float : Float_Type := Float_Type'Last; 11 Biggest_Negative_Float : Float_Type := Float_Type'First; 12 Float_Var : Float_Type; 13 14 begin 15 begin 16 Float_Var := Float_Type'succ (Biggest_Positive_Float); 17 raise Program_Error; 18 exception 19 when Constraint_Error => null; 20 end; 21 22 begin 23 Float_Var := Float_Type'pred (Biggest_Negative_Float); 24 raise Program_Error; 25 exception 26 when Constraint_Error => null; 27 end; 28 end Test_Float_Type; 29 30 procedure Test_Float is new Test_Float_Type (Float); 31 procedure Test_Long_Float is new Test_Float_Type (Long_Float); 32begin 33 Test_Float; 34 Test_Long_Float; 35end Float_Attributes_Overflows; 36