[Ada] Ignore subprogram address in ownership checking

Message ID 20190821083142.GA71838@adacore.com
State New
Headers show
Series
  • [Ada] Ignore subprogram address in ownership checking
Related show

Commit Message

Pierre-Marie de Rodat Aug. 21, 2019, 8:31 a.m.
Ownership checking done as in GNATprove should ignore address of
subprograms, as it applies only on objects. Now fixed.

There is no impact on compilation.

Tested on x86_64-pc-linux-gnu, committed on trunk

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

gcc/ada/

	* sem_spark.adb (Process_Path): Do nothing on address of
	subprogram.

Patch

--- gcc/ada/sem_spark.adb
+++ gcc/ada/sem_spark.adb
@@ -5110,6 +5110,7 @@  package body Sem_SPARK is
       --  in an object.
 
       if not Present (Root)
+        or else not Is_Object (Root)
         or else not Is_Deep (Etype (Root))
       then
          return;