Commit 64dd5395 by Thomas Quinot Committed by Arnaud Charlet

exp_dist.adb (Build_TypeCode_Call): Remove incorrect processing for Itypes.

2005-07-04  Thomas Quinot  <quinot@adacore.com>

	* exp_dist.adb (Build_TypeCode_Call): Remove incorrect processing for
	Itypes. Itypes are really unexpected there.
	(Build_TypeCode_Function): Generalise special processing for Itypes to
	handle the case of numeric implicit base types as well as enumerated
	ones.

From-SVN: r101578
parent 3b641023
...@@ -9638,11 +9638,6 @@ package body Exp_Dist is ...@@ -9638,11 +9638,6 @@ package body Exp_Dist is
U_Type := Base_Type (U_Type); U_Type := Base_Type (U_Type);
end if; end if;
if Is_Itype (U_Type) then
return Build_TypeCode_Call
(Loc, Associated_Node_For_Itype (U_Type), Decls);
end if;
if U_Type = Standard_Boolean then if U_Type = Standard_Boolean then
Lib_RE := RE_TC_B; Lib_RE := RE_TC_B;
...@@ -10105,18 +10100,12 @@ package body Exp_Dist is ...@@ -10105,18 +10100,12 @@ package body Exp_Dist is
and then not Is_Tagged_Type (Typ) and then not Is_Tagged_Type (Typ)
then then
declare declare
D_Node : constant Node_Id := Declaration_Node (Typ);
Parent_Type : Entity_Id := Etype (Typ); Parent_Type : Entity_Id := Etype (Typ);
begin begin
if Is_Enumeration_Type (Typ) if Is_Itype (Parent_Type) then
and then Nkind (D_Node) = N_Subtype_Declaration
and then Nkind (Original_Node (D_Node))
/= N_Subtype_Declaration
then
-- Parent_Type is the implicit intermediate base type -- Skip implicit base type
-- created by Build_Derived_Enumeration_Type.
Parent_Type := Etype (Parent_Type); Parent_Type := Etype (Parent_Type);
end if; end if;
......
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