[Ada] Issue error on SPARK ownership rule violation
authorYannick Moy <moy@adacore.com>
Tue, 23 Jul 2019 08:13:09 +0000 (08:13 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 23 Jul 2019 08:13:09 +0000 (08:13 +0000)
commit15e79d66f00317d3acbfa1c93c9460a65174454b
treea7403d2ab1345401410c7343cce278ec3a08093f
parent39c20502ef7398766a8c9520c4210c2df9769d15
[Ada] Issue error on SPARK ownership rule violation

A modified rule in SPARK RM specifies that object declarations of
anonymous access type should only occur immediately in subprogram, entry
or block. Now checked.

There is no impact on compilation.

2019-07-23  Yannick Moy  <moy@adacore.com>

gcc/ada/

* sem_spark.ads (Is_Local_Context): New function.
* sem_spark.adb (Check_Declaration): Issue errors on violations
of SPARK RM 3.10(4)
(Process_Path): Do not issue error on borrow/observe during
elaboration, as these are caught by the new rule.

From-SVN: r273721
gcc/ada/ChangeLog
gcc/ada/sem_spark.adb
gcc/ada/sem_spark.ads