aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_res.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2017-04-27 12:55:17 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2017-04-27 12:55:17 +0200
commitf24745230fe28ddd92d28ff681bd95d10578e3b0 (patch)
treeb1127dd8d674d84780a7a616a3d3db7b2d875a35 /gcc/ada/sem_res.adb
parent78f2b7ce3aea49818ea97974cb41029f820d0a99 (diff)
downloadgcc-f24745230fe28ddd92d28ff681bd95d10578e3b0.zip
gcc-f24745230fe28ddd92d28ff681bd95d10578e3b0.tar.gz
gcc-f24745230fe28ddd92d28ff681bd95d10578e3b0.tar.bz2
[multiple changes]
2017-04-27 Steve Baird <baird@adacore.com> * exp_ch9.adb (Expand_N_Asynchronous_Select): Initialize the Cancel flag when it is declared in order to avoid confusing CodePeer about the possibility of an uninitialized variable read. 2017-04-27 Ed Schonberg <schonberg@adacore.com> * sem_dim.adb (Analyze_Dimension_Object_Declaration): There is no dimensionality error if the subtype of the expression is identical to the nominal subtype in the declaration, even though the expression itself may have been constant-folded and lack a dimension vector. * sem_dim.ads: Add comments on setting of dimension vectors and its interaction with node rewritings and side-effect removal. 2017-04-27 Bob Duff <duff@adacore.com> * debug.adb: Minor comment correction. * sem_dim.ads: Minor reformatting and typo fixes. 2017-04-27 Bob Duff <duff@adacore.com> * g-table.adb, g-table.adsa, scos.h: From the C side, access First and Last of the tables via function calls, rather than relying on layout of data structures. 2017-04-27 Ed Schonberg <schonberg@adacore.com> * exp_util.adb: No wrapper in GNATprove mode. 2017-04-27 Yannick Moy <moy@adacore.com> * sem_res.adb (Resolve_Comparison_Op): Always evaluate comparisons between values of universal types. 2017-04-27 Hristian Kirtchev <kirtchev@adacore.com> * sem_elab.adb (Check_Internal_Call_Continue): Do not generate an elaboration counter nor a check when in GNATprove mode. * sem_util.adb (Build_Elaboration_Entity): Do not create an elaboration counter when in GNATprove mode. From-SVN: r247317
Diffstat (limited to 'gcc/ada/sem_res.adb')
-rw-r--r--gcc/ada/sem_res.adb11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 383a5a9..132fe67 100644
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -6927,8 +6927,15 @@ package body Sem_Res is
-- this Eval call may change N to True/False. Skip this evaluation
-- inside assertions, in order to keep assertions as written by users
-- for tools that rely on these, e.g. GNATprove for loop invariants.
-
- if In_Assertion_Expr = 0 then
+ -- Except evaluation is still performed even inside assertions for
+ -- comparisons between values of universal type, which are useless
+ -- for static analysis tools, and not supported even by GNATprove.
+
+ if In_Assertion_Expr = 0
+ or else (Is_Universal_Numeric_Type (Etype (L))
+ and then
+ Is_Universal_Numeric_Type (Etype (R)))
+ then
Eval_Relational_Op (N);
end if;
end Resolve_Comparison_Op;