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] fix handling of controlled objects with -gnatc


If a record type has a discriminated component whose base type is a
controlled type, the record type must include a _controller component.
If the base of the component type is not frozen yet, the _controller
component has not been created, and must be created when the enclosing
type is frozen. This is achieved by creating a freeze node for the type
of the component, which the expander uses to declare the new controller
entity, after which is deletes the freeze node (which is useless to the
backend, and may appear in the wrong scope). When expansion is disabled,
as when compiling to create an ASIS tree, the freeze node must not be
generated at all.

2005-03-29  Ed Schonberg  <schonberg@adacore.com>

	* freeze.adb (Freeze_Record_Type): If the type of the component is an
	itype whose parent is controlled and not yet frozen, do not create a
	freeze node for the itype if expansion is disabled.

Attachment: difs.10
Description: Text document


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