summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch4.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch4.adb')
-rw-r--r--gcc/ada/sem_ch4.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch4.adb b/gcc/ada/sem_ch4.adb
index 0af8a4624af..c6769c5d54b 100644
--- a/gcc/ada/sem_ch4.adb
+++ b/gcc/ada/sem_ch4.adb
@@ -8196,6 +8196,12 @@ package body Sem_Ch4 is
while Present (Op) loop
if Comes_From_Source (Op)
and then Is_Overloadable (Op)
+
+ -- Exclude overriding primitive operations of a type
+ -- extension declared in the package body, to prevent
+ -- duplicates in extended list.
+
+ and then not Is_Primitive (Op)
and then Is_List_Member (Unit_Declaration_Node (Op))
and then List_Containing (Unit_Declaration_Node (Op)) =
Body_Decls