diff options
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r-- | gcc/ada/exp_ch7.adb | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 4cb2689..f29a97a 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -2264,16 +2264,13 @@ package body Exp_Ch7 is -- The object is of the form: -- Obj : [constant] Typ [:= Expr]; - -- Do not process tag-to-class-wide conversions because they do - -- not yield an object. Do not process the incomplete view of a - -- deferred constant. Note that an object initialized by means - -- of a build-in-place function call may appear as a deferred - -- constant after expansion activities. These kinds of objects - -- must be finalized. + -- Do not process the incomplete view of a deferred constant. + -- Note that an object initialized by means of a BIP function + -- call may appear as a deferred constant after expansion + -- activities. These kinds of objects must be finalized. elsif not Is_Imported (Obj_Id) and then Needs_Finalization (Obj_Typ) - and then not Is_Tag_To_Class_Wide_Conversion (Obj_Id) and then not (Ekind (Obj_Id) = E_Constant and then not Has_Completion (Obj_Id) and then No (BIP_Initialization_Call (Obj_Id))) @@ -2388,23 +2385,6 @@ package body Exp_Ch7 is and then Present (Status_Flag_Or_Transient_Decl (Obj_Id)) then Processing_Actions (Has_No_Init => True); - - -- Detect a case where a source object has been initialized by - -- a controlled function call or another object which was later - -- rewritten as a class-wide conversion of Ada.Tags.Displace: - - -- Obj1 : CW_Type := Function_Call (...); - -- Obj2 : CW_Type := Src_Obj; - - -- Tmp : ... := Function_Call (...)'reference; - -- Rnn : access CW_Type := (... Ada.Tags.Displace (Tmp)); - -- Obj1 : CW_Type renames Rnn.all; - - -- Rnn : access CW_Type := (...Ada.Tags.Displace (Src_Obj)); - -- Obj2 : CW_Type renames Rnn.all; - - elsif Is_Displacement_Of_Object_Or_Function_Result (Obj_Id) then - Processing_Actions (Has_No_Init => True); end if; -- Inspect the freeze node of an access-to-controlled type and |