From: Viljar Indus Date: Thu, 9 Jan 2025 10:37:56 +0000 (+0200) Subject: ada: Mark the types of operator arguments as used X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f60377fd66e5d10d58ee667230a3e1f4f6f150e2;p=thirdparty%2Fgcc.git ada: Mark the types of operator arguments as used When a use type clause is used then it makes the type and all of its operators use visible in the context. When analyzing whether a use type clause is effective we should additionally mark the types of an overloaded operator as cases where the use type clause is effective. gcc/ada/ChangeLog: * sem_ch8.adb (Mark_Use_Type): Additionally mark the types of the parameters and return values as used when analyzing an operator. --- diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index 0a9ef419db7..6fb9a9a1f5a 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -9504,6 +9504,11 @@ package body Sem_Ch8 is and then Present (Scope (Entity (E))) then Mark_Use_Package (Scope (Entity (E))); + + -- Additionally mark the types of the formals and the return + -- types as used when dealing with an overloaded operator. + + Mark_Parameters (Entity (E)); end if; Curr := Current_Use_Clause (Base);