From: Piotr Trojanek Date: Tue, 27 May 2025 10:17:06 +0000 (+0200) Subject: ada: Fix ALI elaboration flags for ghost compilation units (cont.) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35827ca717e3a3552fc513453fd37d1aeb339382;p=thirdparty%2Fgcc.git ada: Fix ALI elaboration flags for ghost compilation units (cont.) When GNAT was compiling a ghost unit, the ALI file wrongly suggested that this unit required elaboration counters, which caused linking errors to non-existing objects. gcc/ada/ChangeLog: * sem_ch10.adb (Analyze_Compilation_Unit): Ignored ghost unit need no elaboration checks. --- diff --git a/gcc/ada/sem_ch10.adb b/gcc/ada/sem_ch10.adb index 45aabadf21f..3a44149aeff 100644 --- a/gcc/ada/sem_ch10.adb +++ b/gcc/ada/sem_ch10.adb @@ -1491,6 +1491,10 @@ package body Sem_Ch10 is -- No checks required if no separate spec or else Acts_As_Spec (N) + + -- No checked needed for ignored ghost units + + or else Is_Ignored_Ghost_Entity (Spec_Id) ) then -- This is a case where we only need the entity for checking to