From 6c5793cde82f916e03b7a514124fafd1189d7c34 Mon Sep 17 00:00:00 2001 From: charlet Date: Tue, 26 May 2015 08:15:24 +0000 Subject: 2015-05-26 Robert Dewar * aspects.ads, aspects.adb: Add aspect Disable_Controlled. * einfo.ads, einfo.adb (Disable_Controlled): New flag. (Is_Controlled_Active): New function. * exp_ch3.adb (Expand_Freeze_Record_Type): Use Is_Controlled_Active. * exp_util.adb (Needs_Finalization): Finalization not needed if Disable_Controlled set. * freeze.adb (Freeze_Array_Type): Do not set Has_Controlled_Component if the component has Disable_Controlled. (Freeze_Record_Type): ditto. * sem_ch13.adb (Decorate): Minor reformatting. (Analyze_Aspect_Specifications): Implement Disable_Controlled. * sem_ch3.adb (Analyze_Object_Declaration): Handle Disable_Controlled. (Array_Type_Declaration): ditto. (Build_Derived_Private_Type): ditto. (Build_Derived_Type): ditto. (Record_Type_Definition): ditto. * snames.ads-tmpl: Add Name_Disable_Controlled. 2015-05-26 Eric Botcazou * exp_ch6.adb (Expand_Actuals): Use a constant declaration instead of a renaming to capture the return value of a function call. (Expand_Simple_Function_Return): Call Remove_Side_Effects instead of removing side effects manually before the call to _Postconditions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223667 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/exp_ch3.adb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gcc/ada/exp_ch3.adb') diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index 6223c970fca..0bb41fd8a55 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -6936,9 +6936,10 @@ package body Exp_Ch3 is -- type. See Make_CW_Equivalent_Type. if not Is_Class_Wide_Equivalent_Type (Def_Id) - and then (Has_Controlled_Component (Comp_Typ) - or else (Chars (Comp) /= Name_uParent - and then Is_Controlled (Comp_Typ))) + and then + (Has_Controlled_Component (Comp_Typ) + or else (Chars (Comp) /= Name_uParent + and then (Is_Controlled_Active (Comp_Typ)))) then Set_Has_Controlled_Component (Def_Id); end if; -- cgit v1.2.1