From: Eric Botcazou Date: Wed, 23 Mar 2022 22:47:06 +0000 (+0100) Subject: [Ada] Fix small glitch in Expand_N_Full_Type_Declaration X-Git-Tag: basepoints/gcc-14~6668 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42fe7c9a809198b50070eb9033ba2be1447519b9;p=thirdparty%2Fgcc.git [Ada] Fix small glitch in Expand_N_Full_Type_Declaration The original node is not guaranteed to also be an N_Full_Type_Declaration, so the code needs to look into the node itself. gcc/ada/ * exp_ch3.adb (Expand_N_Full_Type_Declaration): Look into N. --- diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb index f2deff74522..4216fecc438 100644 --- a/gcc/ada/exp_ch3.adb +++ b/gcc/ada/exp_ch3.adb @@ -6102,8 +6102,7 @@ package body Exp_Ch3 is Par_Id := Base_Type (Full_View (Par_Id)); end if; - if Nkind (Type_Definition (Original_Node (N))) = - N_Derived_Type_Definition + if Nkind (Type_Definition (N)) = N_Derived_Type_Definition and then not Is_Tagged_Type (Def_Id) and then Present (Freeze_Node (Par_Id)) and then Present (TSS_Elist (Freeze_Node (Par_Id)))