]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Avoid spurious error in GNATprove mode on non-null access types
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Aug 2019 08:29:51 +0000 (08:29 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 21 Aug 2019 08:29:51 +0000 (08:29 +0000)
GNATprove directly handles non-null access checks, and requires that the
frontend does not insert explicit checks in the form of conditional
exceptions being raised. Now fixed.

There is no impact on compilation.

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

gcc/ada/

* checks.adb (Install_Null_Excluding_Check): Do not install
check in GNATprove mode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274780 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/checks.adb

index 65e57efea55779f01a0d81acd4103155ed75e35e..e422ee771da008e0733174191e787eaf76572926 100644 (file)
@@ -1,3 +1,8 @@
+2019-08-21  Yannick Moy  <moy@adacore.com>
+
+       * checks.adb (Install_Null_Excluding_Check): Do not install
+       check in GNATprove mode.
+
 2019-08-21  Yannick Moy  <moy@adacore.com>
 
        * sem_spark.adb (Process_Path): Do nothing on address of
index 61cabedacb6bba0977006fed599d3c08b73e966f..52b29fc9a3bdd8160168ddea2669573c3d512cb9 100644 (file)
@@ -7964,6 +7964,12 @@ package body Checks is
          return;
       end if;
 
+      --  In GNATprove mode, we do not apply the check
+
+      if GNATprove_Mode then
+         return;
+      end if;
+
       --  Otherwise install access check
 
       Insert_Action (N,