aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-12-02 10:21:25 +0100
committerMarc Poulhiès <poulhies@adacore.com>2022-12-06 14:58:48 +0100
commit0cb36c85ab0c9876dde207d5b93aad7398539c7e (patch)
treede01fe4ce5cafc7e9e510a7dc8b84684ec3a55e7 /gcc/tree.cc
parentea588d41f39428b0c3b02f016353dceb1aaaaa39 (diff)
downloadgcc-0cb36c85ab0c9876dde207d5b93aad7398539c7e.zip
gcc-0cb36c85ab0c9876dde207d5b93aad7398539c7e.tar.gz
gcc-0cb36c85ab0c9876dde207d5b93aad7398539c7e.tar.bz2
ada: Fix spurious error in checking of SPARK elaboration
The problem is that the computation of early call regions skips freeze nodes but scenarios involving procedures declared as actions of these freeze nodes are taken into account. As a consequence if a subprogram body, typically of an expression function, is placed just after a freeze node, its early call region depends on whether the construct just before the freeze node can be preelaborated or not; in other words, the legality of calls made from the actions of this freeze node to the subprogram depends on what happens ahead of the freeze node, which may be totally unrelated to the situation. This change disables the ABE diagnostics in this case, as is done in a few other similar cases leading to bogus errors too. gcc/ada/ * sem_elab.adb (Processing_In_State): Add Within_Freezing_Actions component. (Process_Conditional_ABE_Call): Compute its value. (Process_Conditional_ABE_Call_SPARK): For a call and a target in the main unit, do not emit any ABE diagnostics if the call occurs in a freezing actions context.
Diffstat (limited to 'gcc/tree.cc')
0 files changed, 0 insertions, 0 deletions