]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Do not skip non-aliasing checking when inlining in GNATprove
authorYannick Moy <moy@adacore.com>
Mon, 19 Aug 2019 08:35:35 +0000 (08:35 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 19 Aug 2019 08:35:35 +0000 (08:35 +0000)
When code is inlinined for proof in the special mode for GNATprove, Ada
rules about non-aliasing should still be checked. Now fixed.

There is no impact on compilation.

2019-08-19  Yannick Moy  <moy@adacore.com>

gcc/ada/

* sem_res.adb (Resolve_Call): Check non-aliasing rules before
GNATprove inlining.

From-SVN: r274640

gcc/ada/ChangeLog
gcc/ada/sem_res.adb

index 9fc8c9e1139c622cc3e76c35a8ab80ae9da0ec12..9222a98150d45b2a82f667d27a0c7b393542a5bf 100644 (file)
@@ -1,3 +1,8 @@
+2019-08-19  Yannick Moy  <moy@adacore.com>
+
+       * sem_res.adb (Resolve_Call): Check non-aliasing rules before
+       GNATprove inlining.
+
 2019-08-19  Eric Botcazou  <ebotcazou@adacore.com>
 
        * inline.adb (Add_Inlined_Body): Do not add pending
index b27171f0be508eecd7f3d6fbb69acf839d80a4de..8f2e35894d4659c4b10778476294d2f04340d63a 100644 (file)
@@ -6968,6 +6968,10 @@ package body Sem_Res is
 
       Build_Call_Marker (N);
 
+      Mark_Use_Clauses (Subp);
+
+      Warn_On_Overlapping_Actuals (Nam, N);
+
       --  In GNATprove mode, expansion is disabled, but we want to inline some
       --  subprograms to facilitate formal verification. Indirect calls through
       --  a subprogram type or within a generic cannot be inlined. Inlining is
@@ -7116,10 +7120,6 @@ package body Sem_Res is
             end if;
          end if;
       end if;
-
-      Mark_Use_Clauses (Subp);
-
-      Warn_On_Overlapping_Actuals (Nam, N);
    end Resolve_Call;
 
    -----------------------------