From: Ghjuvan Lacambre Date: Tue, 16 Nov 2021 11:19:13 +0000 (+0100) Subject: [Ada] Do not free task for _parent X-Git-Tag: basepoints/gcc-13~2641 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3102ec09c9b7e58312f3c18c841679db5778458;p=thirdparty%2Fgcc.git [Ada] Do not free task for _parent gcc/ada/ * exp_ch7.adb (Cleanup_Record): Don't process parent. --- diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index cd9ff214e25c..68d1da9e5cb9 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -4629,8 +4629,9 @@ package body Exp_Ch7 is Comp := First_Component (U_Typ); while Present (Comp) loop - if Has_Task (Etype (Comp)) - or else Has_Simple_Protected_Object (Etype (Comp)) + if Chars (Comp) /= Name_uParent + and then (Has_Task (Etype (Comp)) + or else Has_Simple_Protected_Object (Etype (Comp))) then Tsk := Make_Selected_Component (Loc,