]> gcc.gnu.org Git - gcc.git/commit
ada: Build invariant procedure while freezing in GNATprove mode
authorPiotr Trojanek <trojanek@adacore.com>
Thu, 19 Jan 2023 23:52:49 +0000 (00:52 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 16 May 2023 08:30:57 +0000 (10:30 +0200)
commitc637076413ad0dc3b9c0018c25df2f2a56b77f67
tree68450d3b834a66470e4af95e0db7d2e0d7bed49c
parent66152ecdaebfce758cb5bd00702449dd2c584e68
ada: Build invariant procedure while freezing in GNATprove mode

Invariant procedure bodies are created either by expansion of freezing
nodes (but only in ordinary compilation mode) or at the end of package
private declarations (but not for with private types in the type
derivation chain).

In GNATprove mode we didn't create invariant procedure bodies in
lightweight expansion, so we didn't create them at all when there were
private types in the type derivation chain.

This patch copies the relevant freezing part from ordinary to
lightweight expansion. This obviously involves code duplication,
but it seems better to duplicate whole sections that work properly
instead of small pieces that are incomplete. There are other pieces
of freezing that are similarly duplicated, so this patch doesn't make
the code substantially worse.

gcc/ada/

* exp_spark.adb (SPARK_Freeze_Type): Copy whole handling of DIC
and Type_Invariant from Freeze_Type.
gcc/ada/exp_spark.adb
This page took 0.060972 seconds and 5 git commands to generate.