[Ada] Additionsal trasformations for unnesting in package bodies
authorEd Schonberg <schonberg@adacore.com>
Tue, 11 Dec 2018 11:09:57 +0000 (11:09 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 11 Dec 2018 11:09:57 +0000 (11:09 +0000)
commit66f84da8f3232cc104cacf16b2c1f99d7f8ba676
treeaa5f9b19a40ba7ec29df4198223d7761566e4956
parentc8a8e6df1ccf4558a112cd5c1021dbc4699cf675
[Ada] Additionsal trasformations for unnesting in package bodies

This patch extends the previous algorithm for creating an explicit
elaboration procedure for a package body when expansion generates
subprograms in the statement part of the body. For unnesting to work
properly, these subprograms must appear within an explicit subprogram
body so that uplevel references can be placed in the proper activation
record.

Ongoing work for LLVM generation.

2018-12-11  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* exp_ch7.adb (Check_Unnesting_Elaboration_Code): Extend
algorithm to cover subprograms generated in nested loops and in
exception handlers, in order to build an explicit elaboration
procedure in more complex cases.

From-SVN: r266987
gcc/ada/ChangeLog
gcc/ada/exp_ch7.adb