[multiple changes]

2009-04-15  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch7.adb (Expand_Ctrl_Function_Call): Check for the case where the
	immediate parent of the controlled function call is a component
	association.

2009-04-15  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb (Use_One_Type): If the type is tagged, indicate that the
	corresponding class-wide type is also in use.

2009-04-15  Thomas Quinot  <quinot@adacore.com>

	* frontend.adb: Minor comment fix

From-SVN: r146110
This commit is contained in:
Arnaud Charlet 2009-04-15 14:48:57 +02:00
parent 3405870d5a
commit c3b36d484f
4 changed files with 31 additions and 5 deletions

View File

@ -1,3 +1,18 @@
2009-04-15 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch7.adb (Expand_Ctrl_Function_Call): Check for the case where the
immediate parent of the controlled function call is a component
association.
2009-04-15 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Use_One_Type): If the type is tagged, indicate that the
corresponding class-wide type is also in use.
2009-04-15 Thomas Quinot <quinot@adacore.com>
* frontend.adb: Minor comment fix
2009-04-15 Robert Dewar <dewar@adacore.com>
* gnatchop.adb (BOM_Length): New global variable

View File

@ -1409,8 +1409,11 @@ package body Exp_Ch7 is
-- expansion is complete. See body of Exp_Aggr for the treatment of
-- other controlled components.
if Nkind (Parent (N)) = N_Aggregate
and then Is_Array_Type (Etype (Parent (N)))
if (Nkind (Parent (N)) = N_Aggregate
and then Is_Array_Type (Etype (Parent (N))))
or else
(Nkind (Parent (N)) = N_Component_Association
and then Is_Array_Type (Etype (Parent (Parent (N)))))
then
return;
end if;

View File

@ -70,7 +70,7 @@ begin
-- logically be performed at elaboration time, were it not for the fact
-- that we may be doing things more than once in the big loop over files.
-- Like elaboration, the order in which these calls are made is in some
-- cases important. For example, Lib cannot be initialized until Namet,
-- cases important. For example, Lib cannot be initialized before Namet,
-- since it uses names table entries.
Rtsfind.Initialize;
@ -277,8 +277,8 @@ begin
end;
end if;
-- If we have restriction No_Exception_Propagation, and we did not have
-- an explicit switch turning off Warn_On_Local_Exception, then turn on
-- If we have restriction No_Exception_Propagation, and we did not have an
-- explicit switch turning off Warn_On_Non_Local_Exception, then turn on
-- this warning by default if we have encountered an exception handler.
if Restriction_Active (No_Exception_Propagation)

View File

@ -7143,6 +7143,14 @@ package body Sem_Ch8 is
elsif not Redundant_Use (Id) then
Set_In_Use (T);
-- If T is tagged, primitive operators on class-wide operands
-- are also available.
if Is_Tagged_Type (T) then
Set_In_Use (Class_Wide_Type (T));
end if;
Set_Current_Use_Clause (T, Parent (Id));
Op_List := Collect_Primitive_Operations (T);