diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/exp_ch7.adb | 17 | ||||
-rw-r--r-- | gcc/ada/exp_util.adb | 12 |
2 files changed, 17 insertions, 12 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index f6c2430..e7bf0bd 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -986,6 +986,11 @@ package body Exp_Ch7 is Set_Finalize_Address_For_Node (Master_Node, Fin_Id); + -- Propagate the Ghost policy from the procedure to the node + + Set_Is_Ignored_Ghost_Entity + (Master_Node, Is_Ignored_Ghost_Entity (Fin_Id)); + Insert_After_And_Analyze (Master_Node_Ins, Master_Node_Attach, Suppress => All_Checks); end Attach_Object_To_Master_Node; @@ -2529,6 +2534,12 @@ package body Exp_Ch7 is elsif Is_Ignored_For_Finalization (Obj_Id) then null; + -- Ignored Ghost objects do not need any cleanup actions + -- because they will not appear in the final tree. + + elsif Is_Ignored_Ghost_Entity (Obj_Id) then + null; + -- Conversely, if one of the above cases created a Master_Node, -- finalization actions are required for the associated object. @@ -2537,12 +2548,6 @@ package body Exp_Ch7 is then Processing_Actions (Decl); - -- Ignored Ghost objects do not need any cleanup actions - -- because they will not appear in the final tree. - - elsif Is_Ignored_Ghost_Entity (Obj_Id) then - null; - -- The object is of the form: -- Obj : [constant] Typ [:= Expr]; diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 970af54..df10891 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -13300,6 +13300,12 @@ package body Exp_Util is elsif Is_Ignored_For_Finalization (Obj_Id) then null; + -- Ignored Ghost objects do not need any cleanup actions because + -- they will not appear in the final tree. + + elsif Is_Ignored_Ghost_Entity (Obj_Id) then + null; + -- Conversely, if one of the above cases created a Master_Node, -- finalization actions are required for the associated object. @@ -13308,12 +13314,6 @@ package body Exp_Util is then return True; - -- Ignored Ghost objects do not need any cleanup actions because - -- they will not appear in the final tree. - - elsif Is_Ignored_Ghost_Entity (Obj_Id) then - null; - -- The object is of the form: -- Obj : [constant] Typ [:= Expr]; -- |