[Ada] Fix missing overflow checks in analysis of predefined unit
authorYannick Moy <moy@adacore.com>
Tue, 7 Jan 2020 16:39:31 +0000 (17:39 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 3 Jun 2020 10:01:32 +0000 (06:01 -0400)
2020-06-03  Yannick Moy  <moy@adacore.com>

gcc/ada/

* inline.adb (Expand_Inlined_Call): Do not suppress checks on
inlined code in GNATprove mode.

gcc/ada/inline.adb

index b6e6a27d1859b4d4f70b9c0b02937294b7c83332..e49b83e88a0164d63fd0f6201a836341810e7de6 100644 (file)
@@ -4103,7 +4103,15 @@ package body Inline is
 
                Reset_Dispatching_Calls (Blk);
 
-               Analyze (Blk, Suppress => All_Checks);
+               --  In GNATprove mode, always consider checks on, even for
+               --  predefined units.
+
+               if GNATprove_Mode then
+                  Analyze (Blk);
+               else
+                  Analyze (Blk, Suppress => All_Checks);
+               end if;
+
                Style_Check := Style;
             end;