https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114300
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Marc Poulhi?s <d...@gcc.gnu.org>: https://gcc.gnu.org/g:524590a3606d773a7827ed469d80f5c8701e5dd8 commit r15-5152-g524590a3606d773a7827ed469d80f5c8701e5dd8 Author: Eric Botcazou <ebotca...@adacore.com> Date: Mon Oct 28 09:13:33 2024 +0100 ada: Fix internal error on instantiation of package with a nested ghost package The instantiation triggers an internal error in Gigi because of a dangling ghost entity created by the finalization machinery. gcc/ada/ChangeLog: PR ada/114300 * exp_ch7.adb (Attach_Object_To_Master_Node): Propagate the Is_Ignored_Ghost_Entity flag from the finalization procedure. (Build_Finalizer.Process_Declarations): Move up the test on Is_Ignored_Ghost_Entity. * exp_util.adb (Requires_Cleanup_Actions): Likewise.