Some static bounds of types are not recognized and evaluated as such in the
semantic analysis phase of the frontend, which leads to incomplete information
in GNATprove. Fix that in the GNATprove mode only, as this is not needed when
full expansion is used.
There is no impact on compilation.
2018-05-28 Yannick Moy <moy@adacore.com>
gcc/ada/
* sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
GNATprove mode, as the order of resolution (low then high) means that
all the information is not available when resolving the low bound the
first time.
From-SVN: r260816
+2018-05-28 Yannick Moy <moy@adacore.com>
+
+ * sem_res.adb (Resolve_Range): Re-resolve the low bound of a range in
+ GNATprove mode, as the order of resolution (low then high) means that
+ all the information is not available when resolving the low bound the
+ first time.
+
2018-05-28 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Array_Info): Start with an explicit blank line and
Resolve (L, Typ);
Resolve (H, Base_Type (Typ));
+ -- Reanalyze the lower bound after both bounds have been analyzed, so
+ -- that the range is known to be static or not by now. This may trigger
+ -- more compile-time evaluation, which is useful for static analysis
+ -- with GNATprove. This is not needed for compilation or static analysis
+ -- with CodePeer, as full expansion does that evaluation then.
+
+ if GNATprove_Mode then
+ Set_Analyzed (L, False);
+ Resolve (L, Typ);
+ end if;
+
-- Check for inappropriate range on unordered enumeration type
if Bad_Unordered_Enumeration_Reference (N, Typ)