diff options
| -rw-r--r-- | gcc/ada/sem_ch3.adb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 3dc47a3..88a4413 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -11398,6 +11398,13 @@ package body Sem_Ch3 is while Present (Prim_Elmt) loop Iface_Subp := Node (Prim_Elmt); + -- Exclude derivation of predefined primitives except those + -- that come from source. Required to catch declarations of + -- equality operators of interfaces. For example: + + -- type Iface is interface; + -- function "=" (Left, Right : Iface) return Boolean; + if not Is_Predefined_Dispatching_Operation (Iface_Subp) or else Comes_From_Source (Iface_Subp) then |
