]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Use Actions field of freeze nodes for subprograms
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 18 Mar 2022 23:23:39 +0000 (00:23 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 17 May 2022 08:25:41 +0000 (08:25 +0000)
commitd4090614041c7803373a5064dfb82fdf6017971d
treee31236cc5772f6f5521aa8c2635a1a3f220d8450
parenta08f366ae875ae70fba5014c94956cdbf7bf91db
[Ada] Use Actions field of freeze nodes for subprograms

This has a couple of advantages: 1) the actions are analyzed with checks
disabled and 2) they are considered elaboration code by Sem_Elab.

gcc/ada/

* exp_ch13.adb (Expand_N_Freeze_Entity): Delete freeze nodes for
subprograms only if they have no actions.
* exp_ch6.adb (Freeze_Subprogram): Put the actions into the Actions
field of the freeze node instead of inserting them after it.
* sem_elab.adb (Is_SPARK_Semantic_Target): Fix typo in comment.
* gcc-interface/trans.cc (process_freeze_entity): Return early for
freeze nodes of subprograms with Interface_Alias set.
gcc/ada/exp_ch13.adb
gcc/ada/exp_ch6.adb
gcc/ada/gcc-interface/trans.cc
gcc/ada/sem_elab.adb