This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Creation of extra formals for primitive operations


Extra formals used to convey accessibility information and constrained status
of an actual are created when a subprogram is frozen. This may be too late in
the rare case where a primitive operation of a type is called within the
initialization procedure for the type. This can only happen if the primitive
in question has an access controlling parameter that is the current instance of
the type. In such a case the extra formals must be created before the analysis
of the initialization procedure, to ensure that the analysis of the call adds
the proper accessibility value to the actuals. In general the subprogram will
be frozen after the call in the initialization procedure.

Tested on x86_64-pc-linux-gnu, committed on trunk

2009-07-07  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch3.adb (Expand_Freeze_Record_Type): Add extra formals to
	primitive operations, in case one of them is called in the
	initialization procedure for the type.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]