]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Fix small glitch in Expand_N_Full_Type_Declaration
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 23 Mar 2022 22:47:06 +0000 (23:47 +0100)
committerPierre-Marie de Rodat <derodat@adacore.com>
Tue, 17 May 2022 08:25:46 +0000 (08:25 +0000)
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.

gcc/ada/exp_ch3.adb

index f2deff74522d99cf57f943da6c14e204c10e639e..4216fecc43842a1d7fa508bdd12054f6e0fddea2 100644 (file)
@@ -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)))