From e7680763dfd9ee980f95ffb865ef3ca7879d10c2 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 6 Apr 2020 08:33:13 -0400 Subject: [PATCH] [Ada] ACATS 4.1P - BC55001 - Error missed 2020-06-16 Arnaud Charlet gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Specification): Generate error message for functions returning interfaces. --- gcc/ada/sem_ch6.adb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 188ee7597dd..55f0c6bb102 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -5464,9 +5464,7 @@ package body Sem_Ch6 is N_Formal_Abstract_Subprogram_Declaration, N_Subprogram_Renaming_Declaration) then - if Is_Abstract_Type (Etype (Designator)) - and then not Is_Interface (Etype (Designator)) - then + if Is_Abstract_Type (Etype (Designator)) then Error_Msg_N ("function that returns abstract type must be abstract", N); -- 2.30.2