This is the mail archive of the 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] AI 327

Tested on i686-linux, committed on trunk.

The allocated size of a task can be specified by means of a pragma, and
it can depend on the discriminants of the type. If the Storage_Size
attribute is used within the body of the task, the proper value cannot
be obtained from the task type itself, but must be retrieved from the TCB
of the current task, using Self. A new function has been introduced
in System.Tasking to retrieve this value.

These patches also add support in the frontend for a new mechanism
defined in Ada 2005 that enables the ceiling priority of a
protected object to be changed by assignment to the new attribute
Priority within a protected operation of the object.

For further information read:

The use of access to protected subprograms from inside the body of a
protected entry was wrong. After this patch, gnat.dg/timing_event.adb
compiles and executes without errors.

Finally, an access to a protected operation is not a simple address, but must
include a reference to the enclosing object. O.P'Access is rewritten
as an aggregate with two components: an access to O and an access to the
code for P. This expansion was not being performed for 'Unrestricted_Access

gnat.dg/prot1.adb will now compile quietly.

2006-10-31  Ed Schonberg  <>
	    Thomas Quinot  <>
	    Javier Miranda  <>
	    Robert Dewar  <>
        * exp_attr.adb: 
        (Expand_Access_To_Protected_Op): If the context indicates that an access
        to a local operation may be transfered outside of the object, create an
        access to the wrapper operation that must be used in an external call.
	(Expand_N_Attribute_Reference, case Attribute_Valid): For the AAMP
	target, pass the Valid attribute applied to a floating-point prefix on
	to the back end without expansion.
	(Storage_Size): Use the new run-time function Storage_Size to retrieve
	the allocated storage when it is specified by a per-object expression.
	(Expand_N_Attribute_Reference): Add case for Attribute_Stub_Type.
	Nothing to do here, the attribute has been rewritten during semantic
	(Expand_Attribute_Reference): Handle expansion of the new Priority
	(Find_Fat_Info): Handle case of universal real
	(Expand_Access_To_Protected_Op): Fix use of access to protected
	subprogram from inside the body of a protected entry.
	(Expand_Access_To_Protected_Op): Common procedure for the expansion of
	'Access and 'Unrestricted_Access, to transform the attribute reference
	into a fat pointer.
	(Is_Constrained_Aliased_View): New predicate to help determine whether a
	subcomponent's enclosing variable is aliased with a constrained subtype.
	(Expand_N_Attribute_Reference, case Attribute_Constrained): For Ada_05,
	test Is_Constrained_Aliased_View rather than Is_Aliased_View, because
	an aliased prefix must be known to be constrained in order to use True
	for the attribute value, and now it's possible for some aliased views
	to be unconstrained.

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]