]> gcc.gnu.org Git - gcc.git/commit
ada: Missing dynamic predicate checks
authorJavier Miranda <miranda@adacore.com>
Mon, 22 Apr 2024 16:36:58 +0000 (16:36 +0000)
committerMarc Poulhiès <poulhies@adacore.com>
Thu, 13 Jun 2024 13:30:27 +0000 (15:30 +0200)
commit0690178e66c2fca5e838ada46fa87fa22502f2d7
tree25e376490e8bf3f8dfdb9fe9615784850d847da4
parent92b554a8412624a0aa3ca9b502976ebec7eff34e
ada: Missing dynamic predicate checks

The compiler does not generate dynamic predicate checks when
they are enabled for one type declaration and ignored for
other type declarations defined in the same scope.

gcc/ada/

* sem_ch13.adb (Analyze_One_Aspect): Set the applicable policy
of a type declaration when its aspect Dynamic_Predicate is
analyzed.

* sem_prag.adb (Handle_Dynamic_Predicate_Check): New subprogram
that enables or ignores dynamic predicate checks depending on
whether dynamic checks are enabled in the context where the
associated type declaration is defined; used in the analysis
of pragma check. In addition, for pragma Predicate, do not
disable it when the aspect was internally build as part of
processing a dynamic predicate aspect.
gcc/ada/sem_ch13.adb
gcc/ada/sem_prag.adb
This page took 0.057125 seconds and 5 git commands to generate.