https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18765
--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- The key is of course the declaration of the "boolean" subtype, so probably: diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 8cf191d751b..9c02ad6ff4f 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -12860,7 +12860,7 @@ package body Sem_Ch6 is <<Check_Inequality>> if Chars (S) = Name_Op_Eq - and then Etype (S) = Standard_Boolean + and then Base_Type (Etype (S)) = Standard_Boolean and then Present (Parent (S)) and then not Is_Dispatching_Operation (S) then