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] Duplicated primitive operations and function wrappers for null extensions

Tested on i686-linux, committed on trunk.

PR ada/34149
In Ada2005, an inherited function of a null extension that dispatches on result
is not abstract. For such functions we generate a wrapper that returns an
extension aggregate. The wrapper function overrides the inherited operation and
therefore replaces it in the dispatch table. However, processing the body of
the wrapper led to an additional insertion of the function into the list of
primitive operations of the type. This duplication caused chaos on further
null extensions of the derived type.

This patch integrates and improves the one submitted by Sam Tardieu for this PR.

A few other clean ups are also done in handling of Ada 2005 constructs.

2007-12-19  Gary Dismukes  <>

	PR ada/34149
	* sem_disp.adb (Check_Dispatching_Call): Augment existing test for
	presence of a statically tagged operand (Present (Static_Tag)) with
	test for Indeterm_Ancestor_Call when determining whether to propagate
	the static tag to tag-indeterminate operands (which forces dispatching
	on such calls).
	(Check_Controlling_Formals): Ada2005, access parameters can have
	(Add_Dispatching_Operation, Check_Operation_From_Private_View): do
	not insert subprogram in list of primitive operations if already there.

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]