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.
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)))