[gcc r15-1493] ada: Fix assertion failure during analysis of instantiation of formal package
Marc Poulhi?s
dkm@gcc.gnu.org
Thu Jun 20 08:55:03 GMT 2024
https://gcc.gnu.org/g:c5d7daa37938984b931ae0825e9d3d72c748ab5a
commit r15-1493-gc5d7daa37938984b931ae0825e9d3d72c748ab5a
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Fri May 24 09:44:10 2024 +0200
ada: Fix assertion failure during analysis of instantiation of formal package
It's an assertion on the name of an instance of a generic child unit and
it needs to cope with a renaming of the unit.
gcc/ada/
* sem_ch12.adb (Instantiate_Formal_Package): Accept renamings of a
generic parent that is a child unit for the abbreviated instance.
Diff:
---
gcc/ada/sem_ch12.adb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index d05c7b611946..8ace16ad0089 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -10996,7 +10996,8 @@ package body Sem_Ch12 is
if Is_Child_Unit (Gen_Parent) then
I_Nam :=
New_Copy_Tree (Name (Original_Node (Analyzed_Formal)));
- pragma Assert (Entity (I_Nam) = Gen_Parent);
+ pragma Assert (Entity (I_Nam) = Gen_Parent
+ or else Renamed_Entity (Entity (I_Nam)) = Gen_Parent);
else
I_Nam :=
More information about the Gcc-cvs
mailing list