From e49f6ee11d9de33706a410f3f1cb328a4b6e6616 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 20 Apr 2020 17:11:20 -0400 Subject: [Ada] Properly test for Protected_Body_Subprogram 2020-06-18 Richard Kenner gcc/ada/ * sem_util.adb (Enclosing_Subprogram): No longer need Convention_Protected. --- gcc/ada/sem_util.adb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 52a3f94..756162e 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -7410,8 +7410,7 @@ package body Sem_Util is -- No body is generated if the protected operation is eliminated - elsif Convention (Dyn_Scop) = Convention_Protected - and then not Is_Eliminated (Dyn_Scop) + elsif not Is_Eliminated (Dyn_Scop) and then Present (Protected_Body_Subprogram (Dyn_Scop)) then return Protected_Body_Subprogram (Dyn_Scop); -- cgit v1.1