From: Richard Kenner Date: Mon, 20 Apr 2020 21:11:20 +0000 (-0400) Subject: [Ada] Properly test for Protected_Body_Subprogram X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e49f6ee11d9de33706a410f3f1cb328a4b6e6616;p=gcc.git [Ada] Properly test for Protected_Body_Subprogram 2020-06-18 Richard Kenner gcc/ada/ * sem_util.adb (Enclosing_Subprogram): No longer need Convention_Protected. --- diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 52a3f947dbe..756162e4a2f 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);