Commit df89ab66 by Ed Schonberg Committed by Arnaud Charlet

sem_ch3.adb (Access_Definition): If the access type is the return result of a protected function...

2008-03-26  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Access_Definition): If the access type is the return
	result of a protected function, create an itype reference for it
	because usage will be in an inner scope from the point of declaration.
	(Build_Derived_Record_Type): Inherit Reverse_Bit_Order and
	OK_To_Reorder_Components.
	(Make_Index): If an overloaded range includes a universal integer
	interpretation, resolve to Standard.Integer.
	(Analyze_Subtype_Indication): Copy Convention to subtype
	(Check_Abstract_Interfaces): Complete semantic checks on the legality of
	limited an synchronized progenitors in type declaration and private
	extension declarations.

	* exp_ch13.adb (Expand_N_Freeze_Entity): If the scope of the entity is a
	protected subprogram body, determine proper scope from subprogram
	declaration.

From-SVN: r133561
parent 06eab6a7
......@@ -212,13 +212,19 @@ package body Exp_Ch13 is
-- expanded away. The same is true for entities in task types, in
-- particular the parameter records of entries (Entities in bodies are
-- all frozen within the body). If we are in the task body, this is a
-- proper scope.
-- proper scope. If we are within a subprogram body, the proper scope
-- is the corresponding spec. This may happen for itypes generated in
-- the bodies of protected operations.
if Ekind (E_Scope) = E_Protected_Type
or else (Ekind (E_Scope) = E_Task_Type
and then not Has_Completion (E_Scope))
then
E_Scope := Scope (E_Scope);
elsif Ekind (E_Scope) = E_Subprogram_Body then
E_Scope := Corresponding_Spec (Unit_Declaration_Node (E_Scope));
end if;
S := Current_Scope;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment