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] polyorb and cxe4005


Tested on i686-linux, committed on trunk.

This fixes a bug with PolyORB PCS and acats test CXE4005.
In some cases wrong subprogram ids could be assigned. This was due to a call    
to Get_Subprogram_Id before the subprograms ids were assigned.
Thus Subprograms Ids were assigned twice and homonyms were wrongly used.
This resulted in failing rpc calls.

Fixes also a longstanding bug in the PolyORB-based implementation of
the DSA, consisting in a missing allocation of a memory zone used for
the transmission of tagged values in remote calls.

Finally, there was an incorrect test in the code generation for DSA receiving
stubs in the GARLIC case that caused controlling formal parameters to always be
unmarshalled before any other constrained formal parameter. This was
inconsistent with the way the formals are marshalled (all unconstrained first,
and then all constrained, irrespective of controlling status), causing a
runtime error when a controlling formal appeared after a constrained,
non-controlling formal in a primitive operation of a remote object.
This change fixes the problem by removing the improper special processing
for controlling formals.

2006-10-31  Thomas Quinot  <quinot@adacore.com>
	    Pablo Oliveira  <oliveira@adacore.com>
        
        * exp_dist.adb (Get_Subprogram_Ids): This function will no more assign
	subprogram Ids, even if they are not yet assigned.
	(Build_Subprogram_Id): It is now this function that will take care of
	calling Assign_Subprogram_Ids if necessary.
	(Add_Receiving_Stubs_To_Declarations): Checking the subprograms ids
	should be done only once they are assigned.
	(Build_From_Any_Function, case of tagged types): Add missing call to
	Allocate_Buffer.
	(Corresponding_Stub_Type): New subprogram. Returns the associated stub
	type for an RACW type.
	(Add_RACW_Features): When processing an RACW declaration for which the
	designated type is already frozen, enforce E.2.2(14) rules immediately.
	(GARLIC_Support.Build_Subprogram_Receiving_Stubs): Do not perform any
	special reordering of controlling formals.

	* exp_dist.ads (Corresponding_Stub_Type): New subprogram. Returns the
	associated stub type for an RACW 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]