diff options
Diffstat (limited to 'gcc/ada/exp_ch9.adb')
-rw-r--r-- | gcc/ada/exp_ch9.adb | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index d75fd3a..9cfc6b5 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -4273,6 +4273,7 @@ package body Exp_Ch9 is Defining_Identifier => Obj, Object_Definition => New_Occurrence_Of (Conctyp, Loc), Expression => ExpR); + Mutate_Ekind (Obj, E_Variable); Set_Etype (Obj, Conctyp); Decls := New_List (Decl); Rewrite (Concval, New_Occurrence_Of (Obj, Loc)); @@ -5747,7 +5748,7 @@ package body Exp_Ch9 is Insert_Before_And_Analyze (N, Decl1); -- Associate the access to subprogram with its original access to - -- protected subprogram type. Needed by the backend to know that this + -- protected subprogram type. Needed by CodePeer to know that this -- type corresponds with an access to protected subprogram type. Set_Original_Access_Type (D_T2, T); @@ -9877,7 +9878,7 @@ package body Exp_Ch9 is -- (T => To_Tag_Ptr (Obj'Address).all, -- Position => -- Ada.Tags.Get_Offset_Index - -- (Ada.Tags.Tag (Concval), + -- (Concval._Tag, -- <interface dispatch table position of Ename>)); -- Note that Obj'Address is recursively expanded into a call to @@ -9898,7 +9899,9 @@ package body Exp_Ch9 is Make_Function_Call (Loc, Name => New_Occurrence_Of (RTE (RE_Get_Offset_Index), Loc), Parameter_Associations => New_List ( - Unchecked_Convert_To (RTE (RE_Tag), Concval), + Make_Attribute_Reference (Loc, + Prefix => Concval, + Attribute_Name => Name_Tag), Make_Integer_Literal (Loc, DT_Position (Entity (Ename)))))))); @@ -10593,14 +10596,6 @@ package body Exp_Ch9 is Build_Accept_Body (Accept_Statement (Alt))); Reset_Scopes_To (Proc_Body, PB_Ent); - - -- During the analysis of the body of the accept statement, any - -- zero cost exception handler records were collected in the - -- Accept_Handler_Records field of the N_Accept_Alternative node. - -- This is where we move them to where they belong, namely the - -- newly created procedure. - - Set_Handler_Records (PB_Ent, Accept_Handler_Records (Alt)); Append (Proc_Body, Body_List); else |