[Ada] Unnesting transformations for blocks in package bodies
The declarations in the package body may have created blocks with nested
subprograms. Such a block must be transformed into a procedure followed
by a call to it, so that unnesting can handle uplevel references within
these nested subprograms (typically generated subprograms to handle
finalization actions).
2018-11-14 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* exp_ch7.adb (Check_Unnesting_In_Declarations): New procedure
to transform blocks that appear in the declarative part of a
package body into subprograms if they contain generated
subprograms (such as finalization routines). Needed to generate
the proper upward references in unnesting mode.
From-SVN: r266117