aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch12.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r--gcc/ada/sem_ch12.adb6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index 1cb9d115c..b5c9e88 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -7574,6 +7574,12 @@ package body Sem_Ch12 is
or else not Same_Instantiated_Function (E1, E2));
end if;
+ -- No check is needed if this is the body of a subprogram that is
+ -- implicitly created in the case of class-wide predefined functions.
+
+ elsif Ekind (E1) = E_Subprogram_Body then
+ null;
+
else
raise Program_Error;
end if;