From: Arnaud Charlet Date: Sun, 22 Nov 2020 10:34:54 +0000 (-0500) Subject: [Ada] Add annotation after recent compiler changes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9348660558358303d4cba070aef8590fde4894d;p=gcc.git [Ada] Add annotation after recent compiler changes gcc/ada/ * exp_util.adb (Process_Current_Value_Condition): Add assertion. * libgnat/s-fatgen.adb (Scaling): Add annotation. --- diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 86e46ea0f1f..21098b7c057 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -6477,9 +6477,7 @@ package body Exp_Util is Loc : constant Source_Ptr := Sloc (Var); Ent : constant Entity_Id := Entity (Var); - procedure Process_Current_Value_Condition - (N : Node_Id; - S : Boolean); + procedure Process_Current_Value_Condition (N : Node_Id; S : Boolean); -- N is an expression which holds either True (S = True) or False (S = -- False) in the condition. This procedure digs out the expression and -- if it refers to Ent, sets Op and Val appropriately. @@ -6540,6 +6538,7 @@ package body Exp_Util is -- Recursively process AND and AND THEN branches Process_Current_Value_Condition (Left_Opnd (Cond), True); + pragma Assert (Op'Valid); if Op /= N_Empty then return; diff --git a/gcc/ada/libgnat/s-fatgen.adb b/gcc/ada/libgnat/s-fatgen.adb index d297451d99c..512b7b21ecd 100644 --- a/gcc/ada/libgnat/s-fatgen.adb +++ b/gcc/ada/libgnat/s-fatgen.adb @@ -653,6 +653,8 @@ package body System.Fat_Gen is if Adjustment > IEEE_Emax - Exp then XX := 0.0; return (if Minus then -1.0 / XX else 1.0 / XX); + pragma Annotate + (CodePeer, Intentional, "divide by zero", "Infinity produced"); -- Check for underflow