[Ada] Suppress the expansion of ignored assertion pragmas
authorHristian Kirtchev <kirtchev@adacore.com>
Mon, 11 Jun 2018 09:19:46 +0000 (09:19 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 11 Jun 2018 09:19:46 +0000 (09:19 +0000)
commita8531f7134a67d2c9dc74af667bcbc4d26de2520
tree9c6c5d72256d1973d7e7ef5c70b481980d23e9ec
parent1985767d6517bd8daa0625f3923e24f0861f68b8
[Ada] Suppress the expansion of ignored assertion pragmas

This patch suppresses the expansion of ignored assertion pragmas.

2018-06-11  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* contracts.adb (Process_Body_Postconditions): Expand only checked
postconditions.
(Process_Contract_Cases_For): Expand only checked contract cases.
(Process_Inherited_Preconditions): Ignored class-wide preconditions are
partially expanded because some of their semantic checks are tied to
the expansion.
(Process_Preconditions_For): Expand only checked preconditions.
(Process_Spec_Postconditions): Expand only checked preconditions.
Ignored class-wide preconditions are partially expanded because some of
their semantic checks are tied to the expansion.
* exp_prag.adb (Expand_N_Pragma): Suppress the expansion of ignored
assertion pragmas.
* exp_util.adb (Add_Inherited_Invariants): Code clean up.
* sem_util.adb (Propagate_Invariant_Attributes): Code clean up.

gcc/testsuite/

* gnat.dg/assertion_policy1.adb, gnat.dg/assertion_policy1_pkg.adb,
gnat.dg/assertion_policy1_pkg.ads: New testcase.

From-SVN: r261430
gcc/ada/ChangeLog
gcc/ada/contracts.adb
gcc/ada/exp_prag.adb
gcc/ada/exp_util.adb
gcc/ada/sem_util.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/assertion_policy1.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/assertion_policy1_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/assertion_policy1_pkg.ads [new file with mode: 0644]