[Ada] Check SPARK restriction on Old/Loop_Entry with pointers
authorYannick Moy <moy@adacore.com>
Wed, 14 Aug 2019 09:51:21 +0000 (09:51 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 14 Aug 2019 09:51:21 +0000 (09:51 +0000)
commit05b77088c086863aa3e5c0456b9a0c0075e05a6d
tree051b67d4c88c69ce524dcc25f8f55b9c44cab514
parent9d7921310e5a265f0db62e45a881c266b8e4bec1
[Ada] Check SPARK restriction on Old/Loop_Entry with pointers

--#! r336866
--#! no-mail

SPARK RM rule 3.10(14) restricts the use of Old and Loop_Entry
attributes on prefixes of an owning or observing type (i.e. a type with
access inside).

There is no impact on compilation.

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

gcc/ada/

* sem_spark.adb (Check_Old_Loop_Entry): New procedure to check
correct use of Old  and Loop_Entry.
(Check_Node): Check subprogram contracts.
(Check_Pragma): Check Loop_Variant.
(Check_Safe_Pointers): Apply checking to library-level
subprogram  declarations as well, in order to check their
contract.

From-SVN: r274453
gcc/ada/ChangeLog
gcc/ada/sem_spark.adb