aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2020-11-22 05:34:54 -0500
committerPierre-Marie de Rodat <derodat@adacore.com>2020-12-14 10:51:53 -0500
commitb9348660558358303d4cba070aef8590fde4894d (patch)
tree3113a5c715e86463af4cb9ee980338257563f022 /gcc
parent415791cf5c906cceff4fc444c3f5795e636ed6ab (diff)
downloadgcc-b9348660558358303d4cba070aef8590fde4894d.zip
gcc-b9348660558358303d4cba070aef8590fde4894d.tar.gz
gcc-b9348660558358303d4cba070aef8590fde4894d.tar.bz2
[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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_util.adb5
-rw-r--r--gcc/ada/libgnat/s-fatgen.adb2
2 files changed, 4 insertions, 3 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 86e46ea..21098b7 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 d297451..512b7b2 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