[Ada] Reject violation of SPARK 6.1.4(12) with enclosing task unit
authorYannick Moy <moy@adacore.com>
Mon, 11 Jun 2018 09:18:56 +0000 (09:18 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 11 Jun 2018 09:18:56 +0000 (09:18 +0000)
commit577b1ab4b158ba501df6c6b721b83043fc26cbff
treea3d2ce9fe0cc844a06a408b652444b43e60632a1
parente194729e56e164093934312a8a46787c4546e92b
[Ada] Reject violation of SPARK 6.1.4(12) with enclosing task unit

SPARK 6.1.4(12) applies both to enclosing subprograms and enclosing task
units, but the latter was not correctly rejected.

2018-06-11  Yannick Moy  <moy@adacore.com>

gcc/ada/

* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context): Adapt for
possible task unit as the enclosing context.

gcc/testsuite/

* gnat.dg/spark1.adb, gnat.dg/spark1.ads: New testcase.

From-SVN: r261421
gcc/ada/ChangeLog
gcc/ada/sem_prag.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/spark1.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/spark1.ads [new file with mode: 0644]