aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-03-23 23:47:06 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-17 08:25:46 +0000
commit42fe7c9a809198b50070eb9033ba2be1447519b9 (patch)
tree2e2254c99520a123a334b84f78a71119815c15dd
parent80d1067508d7cdfa765c93df1737015c07c7f11d (diff)
downloadgcc-42fe7c9a809198b50070eb9033ba2be1447519b9.zip
gcc-42fe7c9a809198b50070eb9033ba2be1447519b9.tar.gz
gcc-42fe7c9a809198b50070eb9033ba2be1447519b9.tar.bz2
[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.
-rw-r--r--gcc/ada/exp_ch3.adb3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index f2deff7..4216fec 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)))