https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112979

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
This appears to be sufficient:

diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 0c25c95c80e..7ee28b0a602 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -8535,7 +8535,7 @@ package body Sem_Ch8 is
                         Current_Entity (Selector_Name (N));
                begin
                   if Present (F)
-                    and then Is_Overloadable (F)
+                    and then Is_Subprogram (F)
                     and then Present (First_Entity (F))
                     and then not Is_Tagged_Type (Etype (First_Entity (F)))
                   then

Reply via email to