r260927 - in /trunk/gcc/ada: ChangeLog exp_ch7.adb

pmderodat@gcc.gnu.org pmderodat@gcc.gnu.org
Wed May 30 08:56:00 GMT 2018


Author: pmderodat
Date: Wed May 30 08:56:44 2018
New Revision: 260927

URL: https://gcc.gnu.org/viewcvs?rev=260927&root=gcc&view=rev
Log:
[Ada] Unnesting: properly handle local subprogram in declare blocks

2018-05-30  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

	* exp_ch7.adb (Check_Unnesting_Elaboration_Code): The statement part of
	a package body that is a compilation unit may contain blocks that
	declare local subprograms.  In Subprogram_Unnesting Mode such
	subprograms must be handled as nested inside the (implicit) elaboration
	procedure that executes that statement part. To handle properly uplevel
	references we construct that subprogram explicitly, to contain blocks
	and inner subprograms, The statement part of the compilation unit
	becomes a call to this subprogram. This is only done if blocks are
	present in the statement list of the body.

Modified:
    trunk/gcc/ada/ChangeLog
    trunk/gcc/ada/exp_ch7.adb



More information about the Gcc-cvs mailing list